You are on page 1of 115

Amazon Auto Scaling

Developer Guide API Version 2009-05-15

Amazon Auto Scaling Developer Guide

Amazon Auto Scaling: Developer Guide


Copyright 2010 Amazon Web Services LLC or its affiliates. All rights reserved.

Amazon Auto Scaling Developer Guide

Table of Contents
Welcome ............................................................................................................................................................ 1 What's New ....................................................................................................................................................... 4 Introduction to Amazon Auto Scaling ............................................................................................................... 5 Amazon Auto Scaling Concepts ....................................................................................................................... 6 Auto Scaling Functional Overview ........................................................................................................ 8 Using Amazon Auto Scaling ........................................................................................................................... 10 Using Auto Scaling Triggers ............................................................................................................... 11 Auto Scaling Behavior ......................................................................................................................... 13 Using the Query API ........................................................................................................................... 14 Using the SOAP API ........................................................................................................................... 17 User Scenarios .................................................................................................................................... 21 How to Set Up an Auto-Scaled Load Balanced EC2 Application .............................................. 22 Expand Auto-Scaled, Load Balanced Application to an Additional Availability Zone ................. 25 Merge Separate Single-Zone Auto Scaling Groups Into a Single Multi-Zone Auto Scaling Group ........................................................................................................................................ 27 Shut Down an Auto-Scaled, Load Balanced Application ........................................................... 30 Troubleshooting Applications ............................................................................................................... 35 API Reference ................................................................................................................................................. 36 WSDL Locations .................................................................................................................................. 36 API Conventions .................................................................................................................................. 37 Common Request Parameters ............................................................................................................ 38 Error Codes ......................................................................................................................................... 40 Auto Scaling Operations ..................................................................................................................... 44 CreateAutoScalingGroup ............................................................................................................ 45 CreateLaunchConfiguration ........................................................................................................ 49 CreateOrUpdateScalingTrigger .................................................................................................. 53 DeleteAutoScalingGroup ............................................................................................................ 58 DeleteLaunchConfiguration ........................................................................................................ 61 DeleteTrigger .............................................................................................................................. 63 DescribeAutoScalingGroups ...................................................................................................... 65 DescribeLaunchConfigurations ................................................................................................... 67 DescribeScalingActivities ........................................................................................................... 70 DescribeTriggers ........................................................................................................................ 73 SetDesiredCapacity .................................................................................................................... 76 TerminateInstanceInAutoScalingGroup ...................................................................................... 78 UpdateAutoScalingGroup ........................................................................................................... 80 Data Types .......................................................................................................................................... 83 Activities ..................................................................................................................................... 84 Activity ........................................................................................................................................ 85 ActivityIDs ................................................................................................................................... 86 AutoScalingGroup ...................................................................................................................... 87 AutoScalingGroupNames ........................................................................................................... 88 AutoScalingGroups ..................................................................................................................... 89 AvailabilityZones ......................................................................................................................... 90 BlockDeviceMapping .................................................................................................................. 91 BlockDeviceMappings ................................................................................................................ 92 Dimension .................................................................................................................................. 93 Dimensions ................................................................................................................................. 94 Instance ...................................................................................................................................... 95 Instances .................................................................................................................................... 96 LaunchConfiguration .................................................................................................................. 97 LaunchConfigurationNames ....................................................................................................... 98 LaunchConfigurations ................................................................................................................. 99 LoadBalancerNames ................................................................................................................ 100 SecurityGroups ......................................................................................................................... 101

Amazon Auto Scaling Developer Guide

Trigger ...................................................................................................................................... Triggers .................................................................................................................................... Glossary ........................................................................................................................................................ Document Conventions ................................................................................................................................. Index ..............................................................................................................................................................

102 104 105 107 110

Amazon Auto Scaling Developer Guide Who Should Read This Guide

Welcome

Topics Who Should Read This Guide (p. 1) How This Guide Is Organized (p. 2) Amazon Auto Scaling Resources (p. 2) Amazon Auto Scaling is an easy-to-use web service to automatically launch or terminate Amazon Elastic Compute Cloud (Amazon EC2) instances based on user-defined triggers. This is the Amazon Auto Scaling Developer Guide. This section describes who should read this guide, how the guide is organized, and other resources related to autoscaling. The following Amazon Web Services (AWS) products will occasionally be referred to using the following abbreviated forms; all copyrights and legal protections still apply. Full Name Amazon Elastic Compute Cloud Amazon Auto Scaling Amazon Machine Image Abbreviated Form Amazon EC2 Auto Scaling AMI

Amazon Auto Scaling is a tool that allows users to create triggers that automatically start and terminate EC2 instances based on pre-determined rules. This service is used in conjunction with Amazon CloudWatch and Amazon Elastic Load Balancing services.

Who Should Read This Guide


This guide is intended for developers, as well as those in IT/Operations, who are building web applications or services hosted in the Amazon Elastic Compute Cloud. To use Auto Scaling, you must also be using Amazon CloudWatch.
API Version 2009-05-15 1

Amazon Auto Scaling Developer Guide Required Knowledge and Skills

Required Knowledge and Skills


Use of this guide assumes you are familiar with the following: XML. For an overview, go to the W3 Schools XML Tutorial. Web services. For an overview, go to the W3 Schools Web Services Tutorial. A programming language for consuming a web service and any related tools. Programming Amazon Elastic Cloud Computing (EC2) applications or services that use Amazon EC2 web service APIs. For information about Amazon EC2, go to the Amazon EC2 product information page.

How This Guide Is Organized


This guide is organized into several major sections described in the table below. Information General information about Auto Scaling Conceptual Information about Auto Scaling API Reference and Programming Related Information Typographic and symbol conventions Relevant Sections What is AutoScaling? (p. 5) Conceptual Overview of Auto Scaling (p. 8) Terminology and Key Concepts (p. 6) API Reference (p. 36) Using Auto Scaling (p. 10) Document Conventions (p. 107)

There are more sections under each category to help you with more specific information as well as a glossary and an index. Most sections are written to stand on their own with some cross dependencies. You should, in general, be able to look up the information you need and go back to work. However, you can also read through the major sections sequentially to get in-depth knowledge about the service.

Amazon Auto Scaling Resources


The table below lists related resources that you'll find useful as you work with this service. Resource Amazon Auto Scaling Technical FAQ Release notes Description The FAQ covers the top 20 questions developers have asked about this product. The release notes give a high-level overview of the current release. They specifically note any new features, corrections, and known issues. A central starting point to find documentation, code samples, release notes, and other information to help you build innovative applications with AWS. A community-based forum for developers to discuss technical questions related to Amazon Web Services.
API Version 2009-05-15 2

AWS Developer Resource Center

Discussion Forums

Amazon Auto Scaling Developer Guide Amazon Auto Scaling Resources

Resource AWS Support Center

Description The home page for AWS Technical Support, including access to our Developer Forums, Technical FAQs, Service Status page, and Premium Support. The primary web page for information about AWS Premium Support, a one-on-one, fast-response support channel to help you build and run applications on AWS Infrastructure Services. The primary web page for information about Amazon Auto Scaling. A central contact point for inquiries concerning AWS billing, account, events, abuse etc. Detailed information about the copyright and trademark usage at Amazon.com and other topics.

Premium Support

Amazon Auto Scaling product information Contact Us Conditions of Use

API Version 2009-05-15 3

Amazon Auto Scaling Developer Guide

What's New
This What's New is associated with the 2009-05-15 API version of Amazon Auto Scaling. This guide was last updated on April 28, 2010. The following table describes the important changes since the last release of the Amazon Auto Scaling Developer Guide. Change New Region Description Amazon Auto Scaling now supports the Asia Pacific (Singapore) Region. For more information, see AutoScaling Group (p. 6) and WSDL Locations (p. 36). Added new US-West (Northern California) Region information. Added information about .NET SDK support. For more information, see Programming Language Support (p. 17). Added information on multiple availability zones. Bug fixes; added additional EU Region information. Bug fixes. Instructions for Command Line Tools have been added to the User Scenarios (p. 21) section. This is the first release of Auto Scaling Developer Guide. Future updates and changes will be noted here. Release Date 28 April 2010

Updated/added content Added content

02 December 2009 11 November 2009

Updated/added content Updated/added content Updated content Added content New Service

19 October 2009 10 September 2009 21 July 2009 28 May 2009 18 May 2009

API Version 2009-05-15 4

Amazon Auto Scaling Developer Guide What is Auto Scaling?

Introduction to Amazon Auto Scaling

Topics What is Auto Scaling? (p. 5) Benefits of Amazon Auto Scaling (p. 5)

What is Auto Scaling?


Amazon Auto Scaling is an easy-to-use web service designed to automatically launch or terminate EC2 instances based on user defined triggers. Users can set up Auto Scaling groups and associate triggers with these groups to automatically scale computing resources based on parameters such as bandwidth usage or CPU utilization. Auto Scaling groups can work across multiple Availability Zones - distinct physical locations for the hosted EC2 instances - so that if an Availability Zone becomes unhealthy or unavailable, Auto Scaling will automatically re-distribute applications to a healthy Availability Zone.

Benefits of Amazon Auto Scaling


The core benefits of Auto Scaling: Elastic CapacityAutomatically add compute capacity when application usage rises and remove it when usage drops Cost SavingSave compute costs by terminating underutilized instances automatically and launching new instances only on demand Geographic Redundancy and ScalabilityAutomatically distribute, scale and balance applications over a wide geographic area using multiple Availability Zones. Easier MaintenanceAutomatically replace lost or unhealthy instances based on pre-defined triggers and thresholds Ease of UseManage your instances spread across either one or several availability zones as a single entity, using simple command-line tools or programmatically via an easy to use web service API

API Version 2009-05-15 5

Amazon Auto Scaling Developer Guide AutoScaling Group

Amazon Auto Scaling Concepts

Topics AutoScaling Group (p. 6) Launch Configuration (p. 7) Trigger (p. 7) Scaling Activity (p. 7) Availability Zones and Regions (p. 7) Auto Scaling Functional Overview (p. 8) This section introduces you to Auto Scaling terminology and concepts. Many of the concepts introduced in this section are discussed in more detail in later sections. The concepts are briefly presented here to give you a basic understanding of common Auto Scalings terms.

AutoScaling Group
An AutoScalingGroup is a representation of an application running on multiple Amazon Elastic Compute Cloud (EC2) instances. The AutoScalingGroup can be used to automatically scale the number of instances or maintain a fixed number of instances. A capacity group can contain EC2 instances that come from one or more EC2 Availability Zones.

Note
To create or work with an AutoScalingGroup in a specific Region, use the corresponding regional service endpoint. Region US-East (Northern Virginia) Region US-West (Northern California) Region EU (Ireland) Region Endpoint autoscaling.us-east-1.amazonaws.com autoscaling.us-west-1.amazonaws.com autoscaling.eu-west-1.amazonaws.com
API Version 2009-05-15 6

Amazon Auto Scaling Developer Guide Launch Configuration

Region Asia Pacific (Singapore) Region

Endpoint autoscaling.ap-southeast-1.amazonaws.com

If no endpoint is explicitly specified, the US-East (Northern Virginia) Region endpoint is used by default. For more information, see CreateAutoScalingGroup (p. 45).

Launch Configuration
A Launch Configuration captures the parameters necessary to create new EC2 Instances. Only one launch configuration can be attached to an AutoScalingGroup at a time. When you attach a new or updated launch configuration to your AutoScalingGroup, any new instances will be launched using the new configuration parameters. For more information, see CreateLaunchConfiguration (p. 49).

Trigger
In Auto Scaling, the trigger mechanism uses defined metrics and thresholds to initiate scaling of AutoScalingGroups. For more information about the supporting API, see CreateOrUpdateScalingTrigger (p. 53).

Scaling Activity
A Scaling Activity is a long-running process that represents a change to your AutoScalingGroup, such as changing the size of the group. It can also be a process to replace an instance, or a process to perform any other long-running operations supported by the API. For more information about the supporting API, see DescribeScalingActivities (p. 70) and CreateOrUpdateScalingTrigger (p. 53).

Availability Zones and Regions


Amazon cloud computing resources are housed in highly available data center facilities. To provide additional scalability and reliability, these data center facilities are located in several different physical locations. These locations are categorized by Regions and Availability Zones. Regions are large and widely dispersed geographic locations; at this time, Amazon has four Regions: the US-East (Northern Virginia) Region (also known as the US Standard Region), the US-West (Northern California) Region, the EU (Ireland) Region and the Asia Pacific (Singapore) Region. Availability Zones are distinct locations within a Region that are engineered to be isolated from failures in other Availability Zones and provide inexpensive, low latency network connectivity to other Availability Zones in the same region. Amazon Auto Scaling allows you to take advantage of the safety and reliability of geographic redundancy by spanning Auto Scaling groups across multiple Availability Zones within a Region. When one Availability Zone becomes unhealthy or unavailable, Auto Scaling will launch new instances in
API Version 2009-05-15 7

Amazon Auto Scaling Developer Guide Auto Scaling Functional Overview

the unaffected Availability Zone; once the unhealthy Availability Zone returns to a healthy state, Auto Scaling will automatically redistribute the application instances evenly across all of the designated Availability Zones.

Auto Scaling Functional Overview


Auto Scaling allows you to take a group of EC2 instances and set various parameters to have this group automatically increase or decrease in number. Auto Scaling can add or remove EC2 instances from that group to help you seamlessly deal with traffic changes to your application. Auto Scaling also monitors the health of each EC2 instance that it launches. If any instance terminates unexpectedly, Auto Scaling detects the termination and launches a replacement instance. This capability allows you to maintain a fixed, desired number of EC2 instances automatically. Auto Scaling is designed to help make using the Amazon Elastic Compute Cloud (EC2) easier by helping reduce the operational burden of deploying and maintaining applications. In a common EC2 scenario, multiple copies of an application run simultaneously in order to cover the volume of customer traffic. Customers only see one URL for the application, but behind that simple URL are many EC2 instances, each potentially handling customer requests. These EC2 instances are categorized into AutoScalingGroups. This is the core concept of the service. AutoScalingGroups are defined with a minimum number and maximum number of EC2 instances. The Auto Scaling service launches more instances (up to the defined maximum) for the AutoScalingGroup to handle an increase in traffic and, as demand decreases, takes instances out of service to more efficiently utilize computing resources. In the following illustration, Internet traffic is routed from the public URL into an AutoScalingGroup named webtier. The AutoScalingGroup has a trigger that increases or decreases the size of the AutoScalingGroup based on the average CPU utilization for the whole group. When the trigger fires, Auto Scaling uses a launch configuration to create a new instance.

Each AutoScalingGroup you create has a launch configuration. Launch configurations automatically launch instances when a trigger is activated. You can create new Launch Configurations based on existing ones.

Note
The maximum number of launch configurations per account is 100.
API Version 2009-05-15 8

Amazon Auto Scaling Developer Guide Auto Scaling Functional Overview

An AutoScalingGroup can only have one launch configuration at a time, but you can change it and new instances will be launched using the new configuration.

Note
Existing instances will not be modified when your Launch Configuration is modified. Auto Scaling uses triggers to indicate when to launch new configurations and when to take them out of service. A trigger is a mechanism that you set to tell the system when you want to increase (scale out) the number of instances and when you want to decrease the number of instances. Triggers can be set to activate on any metric published to Amazon CloudWatch, such as CPU Utilization, and determine if the conditions you specified have been met. If the conditions have been met, then the trigger launches a long-running process called a Scaling Activity (p. 7).

Note
You must use the metrics returned from Amazon CloudWatch to set up your triggers correctly. If you also want to load balance your application, then Auto Scaling can easily accommodate load balance client requests across your application instances. You can add Amazon Elastic Load Balancing LoadBalancers to your AutoScalingGroup and use Elastic Load Balancing metrics (such as request latency or request count) to scale your application. For more information about how to use Auto Scaling APIs to set up your AutoScalingGroups, launch configurations, and triggers, see Using Auto Scaling (p. 10), API Reference (p. 36).

API Version 2009-05-15 9

Amazon Auto Scaling Developer Guide

Using Amazon Auto Scaling


Topics Using Auto Scaling Triggers (p. 11) Auto Scaling Behavior (p. 13) Using the Query API (p. 14) Using the SOAP API (p. 17) User Scenarios (p. 21) Troubleshooting Applications (p. 35) This section provides task-oriented descriptions of how to use and implement Amazon Auto Scaling operations. For a complete description of Auto Scaling operations, refer to the API Reference (p. 36).

API Version 2009-05-15 10

Amazon Auto Scaling Developer Guide Using Auto Scaling Triggers

Using Auto Scaling Triggers


Triggers are a vital mechanism in Auto Scaling. It is important to understand what triggers actually do and when triggers fire. You can control the sensitivity of triggers by adjusting these important parameters when you create your trigger: Period and the BreachDuration. The Period determines how frequently Amazon CloudWatch measures the metrics for your trigger. The BreachDuration is the amount of time a metric can be beyond its defined limit before the trigger fires. Auto Scaling observes the assigned metrics for the selected AutoScalingGroup during every assigned period to verify that the BreachDuration value is within limits defined by the parameters. In the following graph, each monitored period represents a single data point. The number of data points represents the number of Periods within the BreachDuration. If an AutoScalingGroup has a trigger configured to scale-out if the average CPU utilization of your AutoScalingGroup exceeds 40% during a period of 120 seconds, it might look like the following graph.

Note
The red data points in the chart represent measurements beyond the upper threshold defined in the trigger. In the example depicted in the chart, Auto Scaling would have scaled your AutoScalingGroup out at 10:11. The first breach occurred at 10:10 (40%), but it did not reach the breach duration limit until 10:11 (50%).

API Version 2009-05-15 11

Amazon Auto Scaling Developer Guide Using Auto Scaling Triggers

Adjusting the size of the period and the breach duration determines when Auto Scaling fires a trigger. For example, if the period is set to 180 seconds and the breach duration to 360 seconds, the timing of the trigger's firing will change with the same data. The average CPU utilization of your AutoScalingGroup using a period of 180 seconds might look like the following graph:

Note
The red data points in the chart represent measurements beyond the upper threshold defined in the trigger. Because the Average CPU utilization is computed over a longer period, the trigger doesn't fire to scaleout your AutoScalingGroup until 10:20, when the upper threshold has been breached for 360 seconds. This happens because the 360 second breach duration is 2 data points for a 180 second period.

API Version 2009-05-15 12

Amazon Auto Scaling Developer Guide Auto Scaling Behavior

Auto Scaling Behavior


This section discusses Auto Scaling behavior with AutoScalingGroup size rebalancing and instance usage.

Instance Distribution and Balance across Multiple Zones


Amazon Auto Scaling attempts to distribute instances evenly between the Availability Zones that are enabled for your AutoScalingGroup. Auto Scaling uses the Availability Zone with the least number of instances when launching new instances. However, if an Availability Zone has insufficient capacity or if Amazon EC2 is unable to launch new instances in it, then Auto Scaling launches instances in another Availability Zone to satisfy the required capacity for your group. Certain operations and conditions can cause your AutoScalingGroup to become unbalanced. Auto Scaling compensates by creating a rebalancing activity under any of the following conditions: 1. You issue a request to change the Availability Zones for your group. 2. You call TerminateInstanceInAutoScalingGroup, which causes the group to become unbalanced. 3. An Availability Zone that previously had insufficient capacity recovers and has additional capacity available. Auto Scaling always launches new instances before attempting to terminate old ones, so a rebalancing activity will not compromise the performance or availability of your application.

Multi-Zone Instance Counts when Approaching Capacity


Because Auto Scaling always attempts to launch new instances before terminating old ones, being at or near the specified maximum capacity could impede or completely halt rebalancing activities. To avoid this problem, the system can temporarily exceed the specified maximum capacity of a group by a 10% margin during a rebalancing activity. The margin is only extended if the group is at or near maximum capacity and needs rebalancing (either as a result of user-requested rezoning or to compensate for zone availability issues). The extension only lasts as long as needed to re-balanced the group (typically a few minutes).

API Version 2009-05-15 13

Amazon Auto Scaling Developer Guide Using the Query API

Using the Query API


Topics Query Parameters (p. 14) The Request ID (p. 14) Request Authentication (p. 14) Query Example (p. 16) Query requests are HTTP or HTTPS requests that use the HTTP verb GET or POST and a Query parameter named Action or Operation. Action is used throughout this documentation, although Operation is supported for backward compatibility with other AWS Query APIs.

Query Parameters
Each query request must include some common parameters to handle authentication and selection of an action. For more information, see Common Request Parameters (p. 38).

Note
Some API operations take lists of parameters. These lists are specified using the following notation: param.member.n. Values of n are integers starting from 1. All lists of parameters must follow this notation, including lists that only contain one parameter. For example, a query parameter list looks like this:

&attribute.member.1=this &attribute.member.2=that

The Request ID
In every response from AWS, you will see the element ResponseMetadata, which contains a string element called RequestId. This is simply a unique identifier AWS assigns to this request for tracking and troubleshooting purposes.

Request Authentication
You can send Query requests over either HTTP or HTTPS. Regardless of which protocol you use, you must include a signature in every Query request. This section describes how to create the signature. The method described in the following procedure is known as signature version 2.

To create the signature


1. Create the canonicalized query string that you need later in this procedure: a. Sort the UTF-8 query string components by parameter name with natural byte ordering. The parameters can come from the GET URI or from the POST body (when Content-Type is application/x-www-form-urlencoded). URL encode the parameter name and values according to the following rules: Do not URL encode any of the unreserved characters that RFC 3986 defines. These unreserved characters are A-Z, a-z, 0-9, hyphen ( - ), underscore ( _ ), period ( . ), and tilde ( ~ ).
API Version 2009-05-15 14

b.

Amazon Auto Scaling Developer Guide Request Authentication

Percent encode all other characters with %XY, where X and Y are hex characters 0-9 and uppercase A-F. Percent encode extended UTF-8 characters in the form %XY%ZA.... Percent encode the space character as %20 (and not +, as common encoding schemes do).

Note
Currently all AWS service parameter names use unreserved characters, so you don't need to encode them. However, you might want to include code to handle parameter names that use reserved characters, for possible future use. c. d. 2. Separate the encoded parameter names from their encoded values with the equals sign ( = ) (ASCII character 61), even if the parameter value is empty. Separate the name-value pairs with an ampersand ( & ) (ASCII code 38).

Create the string to sign according to the following pseudo-grammar (the "\n" represents an ASCII newline).
StringToSign = HTTPVerb + "\n" + ValueOfHostHeaderInLowercase + "\n" + HTTPRequestURI + "\n" + CanonicalizedQueryString <from the preceding step>

The HTTPRequestURI component is the HTTP absolute path component of the URI up to, but not including, the query string. If the HTTPRequestURI is empty, use a forward slash ( / ). 3. Calculate an RFC 2104-compliant HMAC with the string you just created, your Secret Access Key as the key, and SHA256 or SHA1 as the hash algorithm. For more information, go to http://www.ietf.org/rfc/rfc2104.txt. Convert the resulting value to base64. Use the resulting value as the value of the Signature request parameter.

4. 5.

Important
The final signature you send in the request must be URL encoded as specified in RFC 3986 (for more information, go to http://www.ietf.org/rfc/rfc3986.txt). If your toolkit URL encodes your final request, then it handles the required URL encoding of the signature. If your toolkit doesn't URL encode the final request, then make sure to URL encode the signature before you include it in the request. Most importantly, make sure the signature is URL encoded only once. A common mistake is to URL encode it manually during signature formation, and then again when the toolkit URL encodes the entire request.

API Version 2009-05-15 15

Amazon Auto Scaling Developer Guide Query Example

Query Example
Example Describe AutoScalingGroup API Request
This example uses Auto Scaling CreateAutoScalingGroup (p. 45)
http://autoscaling.amazonaws.com/?AutoScalingGroupName=webtier &LaunchConfigurationName=wt20080929 &MinSize=0 &MaxSize=2 &Cooldown=0 &AvailabilityZones.member.1=us-east-1c &Action=CreateAutoScalingGroup &Version=2009-05-15 &SignatureVersion=2 &SignatureMethod=HmacSHA256 &AWSAccessKeyId=<Your AWS Access Key ID>

Following is the string to sign.


http://autoscaling.amazonaws.com/?AutoScalingGroupName=webtier &LaunchConfigurationName=wt20080929 &MinSize=0 &MaxSize=2 &Cooldown=0 &AvailabilityZones.member.1=us-east-1c &Action=CreateAutoScalingGroup &SignatureMethod=HmacSHA256 &SignatureVersion=2 &Version=2009-05-15

Following is the signed request.


http://autoscaling.amazonaws.com/?AutoScalingGroupName=webtier &LaunchConfigurationName=wt20080929 &MinSize=0 &MaxSize=2 &Cooldown=0 &AvailabilityZones.member.1=us-east-1c &Action=CreateAutoScalingGroup &Version=2009-05-15 &Expires=2008-02-10T12%3A00%3A00Z &Signature=<URLEncode(Base64Encode(Signature))> &SignatureVersion=2 &SignatureMethod=HmacSHA256 &AWSAccessKeyId=<Your AWS Access Key ID>

API Version 2009-05-15 16

Amazon Auto Scaling Developer Guide Using the SOAP API

Using the SOAP API


Topics WSDL and Schema Definitions (p. 17) Programming Language Support (p. 17) Request Authentication (p. 17) The Response Structure (p. 19)

WSDL and Schema Definitions


You can access Auto Scaling using the SOAP web services messaging protocol. This interface is described by a Web Services Description Language (WSDL) document, which defines the operations and security model for the particular service. The WSDL references an XML schema document which strictly defines the data types that might appear in SOAP requests and responses. For more information on WSDL and SOAP, go to the W3 Schools XML Tutorial.

Note
Auto Scaling only supports SOAP through HTTPS. All schemas have a version number. The version number appears in the URL of a schema file and in a schema's target namespace. This makes upgrading easy by differentiating requests based on the version number.

Programming Language Support


Since the SOAP requests and responses in Auto Scaling Web Service follow current standards, nearly any programming language can be used.

Note
AWS provides libraries, sample code, tutorials, and other resources for software developers who prefer to build applications using language-specific APIs instead of Amazon Auto Scaling's SOAP and Query APIs. These libraries provide basic functions (not included in Amazon Auto Scaling's SOAP and Query APIs), such as request authentication, request retries, and error handling so that it's easier to get started. Libraries and resources are available for the following languages: Java PHP Ruby Windows and .NET For libraries and sample code in all languages, go to Sample Code & Libraries.

Request Authentication
Auto Scaling web service complies with the current WS-Security standard, which requires you to hash and sign SOAP requests for integrity and non-repudiation. WS-Security defines profiles, which are used to implement various levels of security. Secure Auto Scaling SOAP messages use the BinarySecurityToken profile consisting of an X.509 certificate with an RSA public key.
API Version 2009-05-15 17

Amazon Auto Scaling Developer Guide Request Authentication

The following is the content of an insecure RunInstances operation (using EC2 as an example in this situation).
<RunInstances xmlns="http://ec2.amazonaws.com/doc/2008-05-05"> <instancesSet> <item> <imageId>ami-60a54009</imageId> <minCount>1</minCount> <maxCount>3</maxCount> </item> </instancesSet> <groupSet/> </RunInstances>

To secure the request, we add the BinarySecurityToken element. The secure version of the request begins with the following.
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/ envelope/"> <SOAP-ENV:Header> <wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/ oasis-200401-wss-wssecurity-secext-1.0.xsd"> <wsse:BinarySecurityToken xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wsswssecurity-utility-1.0.xsd" EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wsssoap-message-security-1.0#Base64Binary" ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wssx509-token-profile-1.0#X509v3" wsu:Id="CertId-1064304">....many, many lines of base64 encoded X.509 certificate...</wsse:BinarySecurityToken> <ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#"> <ds:SignedInfo> <ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/ xml-exc-c14n#"></ds:CanonicalizationMethod> <ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/ xmldsig#rsa-sha1"></ds:SignatureMethod> <ds:Reference URI="#id-17984263"> <ds:Transforms> <ds:Transform Algorithm="http://www.w3.org/2001/10/xml-excc14n#"></ds:Transform> </ds:Transforms> <ds:DigestMethod Algorithm="http://www.w3.org/2000/09/ xmldsig#sha1"></ds:DigestMethod> <ds:DigestValue>0pjZ1+TvgPf6uG7o+Yp3l2YdGZ4=</ds:DigestValue> </ds:Reference> <ds:Reference URI="#id-15778003"> <ds:Transforms> <ds:Transform Algorithm="http://www.w3.org/2001/10/xml-excc14n#"></ds:Transform> </ds:Transforms> <ds:DigestMethod Algorithm="http://www.w3.org/2000/09/ xmldsig#sha1"></ds:DigestMethod> <ds:DigestValue>HhRbxBBmc2OO348f8nLNZyo4AOM=</ds:DigestValue> </ds:Reference> </ds:SignedInfo>

<ds:SignatureValue>bmVx24Qom4kd9QQtclxWIlgLk4QsQBPaKESi79x479xgbO9PEStXMiHZuBAi9luuKdNTcfQ8 d API Version 2009-05-15 18

Amazon Auto Scaling Developer Guide The Response Structure

jjHKZKEQRCOlLVy0Dn5ZL1RlMHsv+OzJzzvIJFTq3LQKNrzJzsNe</ ds:SignatureValue> <ds:KeyInfo Id="KeyId-17007273"> <wsse:SecurityTokenReference xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401wss-wssecurity-utility-1.0.xsd" wsu:Id="STRId-22438818"> <wsse:Reference URI="#CertId-1064304" ValueType="http://docs.oasis-open.org/ wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3"> </wsse:Reference> </wsse:SecurityTokenReference> </ds:KeyInfo> </ds:Signature> <wsu:Timestamp xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wsswssecurity-utility-1.0.xsd" wsu:Id="id-17984263"> <wsu:Created>2006-06-09T10:57:35Z</wsu:Created> <wsu:Expires>2006-06-09T11:02:35Z</wsu:Expires> </wsu:Timestamp> </wsse:Security> </SOAP-ENV:Header>

The following are the most important elements when parsing requests.

Elements
BinarySecurityTokenContains the X.509 certificate in base64 encoded PEM format SignatureContains an XML digital signature created using the canonicalization, signature algorithm, and digest method TimestampRequests to Auto Scaling are valid within 5 minutes of this value to help prevent replay attacks

The Response Structure


In response to a request, Auto Scaling web service returns an XML data structure that conforms to an XML schema defined as part of Auto Scaling WSDL. The structure of a XML response is specific to the associated request. In general, the response data types are named according to the operation performed and whether the data type is a container (can have children). Examples of containers include groupSet for security groups and instancesSet for instances. Item elements are children of containers and their contents vary according to the container's role. The following is an example response (using EC2 as an example):

<RunInstancesResponse xmlns="http://ec2.amazonaws.com/doc/2008-05-05"> <reservationId>r-47a5402e</reservationId> <ownerId>UYY3TLBUXIEON5NQVUUX6OMPWBZIQNFM</ownerId> <groupSet> <item> <groupId>default</groupId> </item> </groupSet> <instancesSet> <item> <instanceId>i-2ba64342</instanceId> <imageId>ami-60a54009</imageId> <instanceState> API Version 2009-05-15 19

Amazon Auto Scaling Developer Guide The Response Structure

<code>0</code> <name>pending</name> </instanceState> <dnsName></dnsName> </item> <item> <instanceId>i-2bc64242</instanceId> <imageId>ami-60a54009</imageId> <instanceState> <code>0</code> <name>pending</name> </instanceState> <dnsName>ec2-67-202-51-176.compute-1.amazonaws.com </dnsName> </item> <item> <instanceId>i-2be64332</instanceId> <imageId>ami-60a54009</imageId> <instanceState> <code>0</code> <name>pending</name> </instanceState> <dnsName>ec2-67-202-51-122.compute-1.amazonaws.com</dnsName> <keyName>example-key-name</keyName> <instanceType>m1.small</instanceType> <launchTime>2007-08-07T11:54:42.000Z</launchTime> </item> </instancesSet> </RunInstancesResponse>

API Version 2009-05-15 20

Amazon Auto Scaling Developer Guide User Scenarios

User Scenarios
Topics How to Set Up an Auto-Scaled Load Balanced EC2 Application (p. 22) Expand Auto-Scaled, Load Balanced Application to an Additional Availability Zone (p. 25) Merge Separate Single-Zone Auto Scaling Groups Into a Single Multi-Zone Auto Scaling Group (p. 27) Shut Down an Auto-Scaled, Load Balanced Application (p. 30) This section discusses some common user scenarios for Auto Scaling. These scenarios demonstrate the needed API and command line sequences to accomplish the given tasks.

Note
The examples in the following sections assume that your instances are in the US Standard Region. If your instances are in Europe, you must specify the eu-west1 Region by using the -region eu-west-1 parameter or setting the EC2_REGION environment variable.

API Version 2009-05-15 21

Amazon Auto Scaling Developer Guide How to Set Up an Auto-Scaled Load Balanced EC2 Application

How to Set Up an Auto-Scaled Load Balanced EC2 Application


In this example, you set up an EC2 application to be load balanced and auto-scaled with a minimum number of two instances and maximum number of 20 instances. Auto Scaling in this example is configured to scale out by 1 when the applications average CPU Utilization exceeds a threshold of 80%, and scale in by 1 when the application's average CPU utilization drops below 40% for 10 minutes. For the purpose of this example, we assume you have the following: An AMI for your EC2 application A defined LoadBalancer

Note
This scenario is for both a load balanced and auto-scaled application. In the following examples, if you aren't using Elastic Load Balancing or don't want to load balance your application, omit all of step 1 and omit the list of load balancers from step 3.

API Example
To set up an auto-scaled, load balanced EC2 application 1. Call CreateLoadBalancer with the following parameters: AvailabilityZones = us-east-1a LoadBalancerName = MyLoadBalancer 2. Listeners = lb-port=80,instance-port=8080,protocol=HTTP Call CreateLaunchConfiguration with the following parameters: ImageId = myAMI LaunchConfigurationName = MyLaunchConfiguration InstanceType = m1.small 3. Call CreateAutoScalingGroup with the following parameters: AutoScalingGroupName = MyAutoScalingGroup AvailabilityZones = us-east-1a LaunchConfigurationName = MyLaunchConfiguration LoadBalancerNames = MyLoadBalancer MaxSize = 20 4. MinSize = 2 Call CreateOrUpdateScalingTrigger with the following parameters: AutoScalingGroupName = MyAutoScalingGroup Dimension: Name= AutoScalingGroupName Value= MyAutoScalingGroup
MeasureName = CPUUtilization Statistic = Average TriggerName = MyTrigger1a Namespace = AWS/EC2 Period = 60 API Version 2009-05-15 22

Amazon Auto Scaling Developer Guide How to Set Up an Auto-Scaled Load Balanced EC2 Application

LowerThreshold = 40 LowerBreachScaleIncrement = -1 UpperThreshold = 80 UpperBreachScaleIncrement = 1 BreachDuration = 600 For documentation on CreateLoadBalancer, refer to the API Reference section of the Amazon Elastic Load Balancing Developer Guide. Your EC2 application has been launched as an auto-scaled and load balanced application.

Command Line Tools Example


In this example, you will need to enter commands for both Auto Scaling and Elastic Load Balancing. To set up an auto-scaled, load balanced EC2 application 1. Use the Elastic Load Balancing elb-create-lb command.
PROMPT> elb-create-lb MyLoadBalancer --headers --listener "lbport=80,instance-port=8080,protocol=HTTP" --availability-zones us-east-1a

Elastic Load Balancing returns the following:


DNS-NAME DNS-NAME DNS-NAME MyLoadBalancer-2111276808.elb.us-east-1.amazonaws.com

2.

Use the Auto Scaling as-create-launch-config command.


PROMPT> as-create-launch-config MyLaunchConfiguration --image-id myAMI --instance-type m1.small

Auto Scaling returns the following:


OK-Created launch config

3.

Use the Auto Scaling as-create-auto-scaling-group command.


PROMPT> as-create-auto-scaling-group MyAutoScalingGroup --launchconfiguration MyLaunchConfiguration --availability-zones us-east-1a --min-size 2 --max-size 20 --loadbalancers MyLoadBalancer

Auto Scaling returns the following:


OK-Created AutoScalingGroup

4.

Use the Auto Scaling as-create-or-update-trigger command.


PROMPT> as-create-or-update-trigger MyTrigger --auto-scaling-group MyAutoScalingGroup --namespace "AWS/EC2" --measure CPUUtilization -statistic Average --dimensions "AutoScalingGroupName=MyAutoScalingGroup" --period 60 --lower-threshold 40 --upper-threshold 80 "--lower-breachincrement=-1" "--upper-breach-increment=1" --breach-duration 600

Auto Scaling returns the following:


OK-Created/Updated Trigger API Version 2009-05-15 23

Amazon Auto Scaling Developer Guide How to Set Up an Auto-Scaled Load Balanced EC2 Application

5.

Verify your scaling activities by using the as-describe-scaling-activities command.


as-describe-scaling-activities MyAutoScalingGroup

Auto Scaling returns the following:


ACTIVITY ACTIVITY-ID END-TIME CODE CAUSE ACTIVITY 74758a33-bfd5-4df... 2009-05-11T16:27:36Z Successful "At 2009-05-1100:00:00Z an instance was started in response to a difference between desired and actual capacity, increasing the capacity from 0 to 1."

6.

Verify your triggers by using the as-describe-triggers command as in the following example.
PROMPT> as-describe-triggers MyAutoScalingGroup

Auto Scaling returns the following:


TRIGGER MyTrigger Average 60 MyAutoScalingGroup NoData AWS/EC2 CPUUtilization

Your EC2 application has been launched as an auto-scaled and load balanced application.

Give Us Your Feedback


Your input is important to us to help make our documentation helpful and easy to use. Please take a minute to give us your feedback on how well we were able to help you use Auto Scaling. Just click this feedback link. Thank you.

API Version 2009-05-15 24

Amazon Auto Scaling Developer Guide Expand Auto-Scaled, Load Balanced Application to an Additional Availability Zone

Expand Auto-Scaled, Load Balanced Application to an Additional Availability Zone


In this example, you expand a load-balanced application to an additional Availability zone. For this example, we assume the following: The application is auto-scaled and running in two availability zones ("us-east-1a" and "us-east-1b")

API Example
To expand an auto-scaled, load balanced application to an additional Availability Zone 1. Call UpdateAutoScalingGroup with the following parameters: AvailabilityZones = us-east1a, us-east1b, us-east1c AutoScalingGroupName = MyAutoScalingGroup MinSize = 3

Note
This scenario is for both a load balanced and auto-scaled application. If you aren't using Elastic Load Balancing or don't want to load balance your application, omit steps 2 and 3. 2. Call the Elastic Load Balancing service API DescribeInstanceHealth. When the status of each of the new instances (in the new Availability Zone) changes to OutOfService, indicating that the instances are now recognized by the Elastic Load Balancing and ready, proceed to the next step.

Note
When you call EnableAvailabilityZonesForLoadBalancer, the LoadBalancer begins to route traffic equally among all the enabled Availability Zones. 3. Call EnableAvailabilityZonesForLoadBalancer: AvailabilityZones = us-east-1c LoadBalancerName = MyLoadBalancer For documentation on DescribeInstanceHealth and EnableAvailabilityZonesForLoadBalancer, see the API Reference in the Elastic Load Balancing Developer Guide. You have now load balanced your EC2 application across three Availability Zones and auto-scaled it in each zone.

Command Line Tools Example


To expand an auto-scaled, load balanced application to an additional Availability Zone 1. Use the Auto Scaling as-update-auto-scaling-group command as in the following example.
as-update-auto-scaling-group MyAutoScalingGroup --zones us-east1a, useast1b, us-east1c --min-size 3 API Version 2009-05-15 25

Amazon Auto Scaling Developer Guide Expand Auto-Scaled, Load Balanced Application to an Additional Availability Zone

Auto Scaling returns the following:


OK-AutoScaling Group updated

Note
This scenario is for both a load balanced and auto-scaled application. If you aren't using Elastic Load Balancing or don't want to load balance your application, omit steps 2 and 3. 2. Use the Elastic Load Balancing elb-describe-instance-health command as in the following example.
PROMPT> elb-describe-instance-health MyLoadBalancer

Elastic Load Balancing returns the following:


INSTANCE INSTANCE INSTANCE INSTANCE-ID STATE i-4f8cf126 OutofService i-0bb7ca62 OutofService

When the status of each of the new instances (in the AutoScalingGroup in the new Availability Zone) changes to OutOfService, indicating that the instances are now recognized by the Elastic Load Balancing and ready, proceed to the next step. When you call elb-enable-zones-for-lb command, the LoadBalancer begins to route traffic equally among all of the enabled Availability Zones. Use the Elastic Load Balancing elb-enable-zones-for-lb command as in the following example.
PROMPT>elb-enable-zones-for-lb zones us-east-1c MyLoadBalancer --headers --availability-

3.

Elastic Load Balancing returns the following:


AVAILABILITY_ZONES AVAILABILITY_ZONES AVAILABILITY-ZONES "us-east-1a, us-east-1b, us-east-1c"

Give Us Your Feedback


Your input is important to us to help make our documentation helpful and easy to use. Please take a minute to give us your feedback on how well we were able to help you use Auto Scaling. Just click this feedback link. Thank you.

API Version 2009-05-15 26

Amazon Auto Scaling Developer Guide Merge Separate Single-Zone Auto Scaling Groups Into a Single Multi-Zone Auto Scaling Group

Merge Separate Single-Zone Auto Scaling Groups Into a Single Multi-Zone Auto Scaling Group
To merge separate single-zone Auto Scaling Groups into a single Auto Scaling Group spanning multiple Availability Zones, rezone one of the single-zone groups into a multi-zone Auto Scaling Group, and then delete the other Auto Scaling Groups. The following examples assume that you have two identical groups: myGroupA in Availability Zone useast-1a, and myGroupB in Availability Zone us-east-1c. Each group is defined with 2 minimum instances, 5 maximum instances, and a desired capacity of 3.

Note
This example works for groups with or without a load balancer, provided that the new multizone group will be in the one of the same zones as the original single-zone groups.

API Example
To merge separate single-zone Auto Scaling Groups into a single multi-zone group 1. Call UpdateAutoScalingGroup with the following parameters to add myGroupA to additional Availability Zones: AvailabilityZones = us-east-1a, us-east-1c AutoScalingGroupName = myGroupA MinSize = 4 MaxSize = 10 Call SetDesiredCapacity with the following parameters to increase the capacity of myGroupA to 6: AutoScalingGroupName = myGroupA 3. DesiredCapacity = 6 Call DescribeAutoScalingGroups with the following parameters to check that myGroupA has been successfully added to the additional zones and is at the required capacity: AutoScalingGroupName = myGroupA 4. Delete myGroupB: a. Call UpdateAutoScalingGroup with the following parameters: AutoScalingGroupName = myGroupB MinSize = 0 MaxSize = 0 Verify your changes to myGroupB have taken effect by doing the following: i. ii. c. Call DescribeAutoScalingGroup myGroupB to verify that there are no instances left in the group. Call DescribeScalingActivites myGroupB to verify that all scaling activities have completed.

2.

b.

Call DeleteAutoScalingGroup with the following parameters: AutoScalingGroupName = myGroupB


API Version 2009-05-15 27

Amazon Auto Scaling Developer Guide Merge Separate Single-Zone Auto Scaling Groups Into a Single Multi-Zone Auto Scaling Group

Command Line Tools Example


To merge separate single-zone Auto Scaling Groups into a single multi-zone group: 1. Use the Auto Scaling as-update-auto-scaling-group command to add myGroupA to additional Availability Zones.
as-update-auto-scaling-group myGroupA --availability-zones us-east-1a, useast-1c -max-size 10 -min-size 4

Auto Scaling returns the following: OK-AutoScaling Group updated 2. 3. Use the as-set-desired-capacity command to increase the capacity of myGroupA to 6. PROMPT> as-set-desired-capacity myGroupA --desired-capacity 6 Use the as-describe-auto-scaling-groups command to check that myGroupA has been successfully added to the additional zones and is at the required capacity: PROMPT>as-describe-auto-scaling-groups myGroupA Delete myGroupB: a. Use the Auto Scaling as-update-auto-scaling-group command.
as-update-auto-scaling-group myGroupB --min-size 0 -max-size 0

4.

Auto Scaling returns the following


OK-AutoScaling Group updated

b.

Verify that there are no instances in your AutoScalingGroup by using the Auto Scaling asdescribe-auto-scaling-groups command.

Note
Call this command until there are no more instances remaining in the AutoScalingGroup.

as-describe-auto-scaling-groups myGroupB --headers

Auto Scaling returns the following:

AUTO-SCALING-GROUP GROUP-NAME AVAILABILITY-ZONES MIN-SIZE MAX-SIZE AUTO-SCALING-GROUP myGroupB east-1c 0 0 0

LAUNCH-CONFIG DESIRED-CAPACITY MyLaunchConfiguration

us-

c.

Verify your scaling activities are successful by using the Auto Scaling as-describe-scalingactivities command.
as-describe-scaling-activities myGroupB

Auto Scaling returns the following:

ACTIVITY ACTIVITY-ID END-TIME CODE ACTIVITY 74758a33-bfd5-4df... 2009-05-11T16:27:36Z Successful 2009-05-21 10:00:00Z an instance was shutdown." ACTIVITY 74958a77-bfd5-4df... 2009-05-11T16:27:36Z Successful API an instance was 2009-05-21 10:00:00Z Version 2009-05-15 shutdown." 28

CAUSE "At "At

Amazon Auto Scaling Developer Guide Merge Separate Single-Zone Auto Scaling Groups Into a Single Multi-Zone Auto Scaling Group

d.

Use the Auto Scaling as-delete-auto-scaling-group command.


PROMPT> as-delete-auto-scaling-group myGroupB

Auto Scaling returns the following:


Are you sure you want to delete this AutoScalingGroup? [Ny]y

Enter Y to delete the trigger.

Auto Scaling returns the following:


OK-Deleted AutoScalingGroup

Give Us Your Feedback


Your input is important to us to help make our documentation helpful and easy to use. Please take a minute to give us your feedback on how well we were able to help you use Auto Scaling. Just click this feedback link. Thank you.

API Version 2009-05-15 29

Amazon Auto Scaling Developer Guide Shut Down an Auto-Scaled, Load Balanced Application

Shut Down an Auto-Scaled, Load Balanced Application


In this example, you completely shut down an application running in multiple AutoScalingGroups. All EC2 instances for an online application are shut down. All AutoScalingGroups and triggers managing the application are deleted. In this example, we assume you have an application (associated with LoadBalancer MyLoadBalancer) running on a set of EC2 instances in several AutoScalingGroups ( e.g. MyAutoScalingGroup1a, MyAutoScalingGroup1b ...). The application is load balanced, and it is auto-scaled through corresponding scaling triggers (e.g. MyTrigger1a for MyAutoScalingGroup, MyTrigger1b for MyAutoScalingGroup1b, etc.).

Note
This scenario is for both a load balanced and auto-scaled application. If you aren't using Elastic Load Balancing, omit step 11 from the following examples.

API Example
To shut down an auto-scaled, load balanced application 1. Delete MyScalingGroup1a: a. Call DeleteTrigger with the following parameters: AutoScalingGroupName = MyAutoScalingGroup1a TriggerName = MyTrigger1a b. Call UpdateAutoScalingGroup with the following parameters: AutoScalingGroupName = MyAutoScalingGroup1a MinSize = 0 MaxSize = 0 c. Verify your changes to MyAutoScalingGroup1a have taken effect by doing the following: i. ii. d. Call DescribeAutoScalingGroup MyAutoScalingGroup1a to verify that there are no instances left in the group. Call DescribeScalingActivites MyAutoScalingGroup1a to verify that all scaling activities have completed.

Verify that your scaling activities are successful by doing the following: Call DescribeScalingActivites MyAutoScalingGroup1a to verify that all scaling activities have completed.

e.

Call DeleteAutoScalingGroup with the following parameters: AutoScalingGroupName = MyAutoScalingGroup1a

2.

Delete MyAutoScalingGroup1b: a. Call DeleteTrigger with the following parameters: AutoScalingGroupName = MyAutoScalingGroup1b TriggerName = MyTrigger1b b. Call UpdateAutoScalingGroup with the following parameters:
API Version 2009-05-15 30

Amazon Auto Scaling Developer Guide Shut Down an Auto-Scaled, Load Balanced Application

AutoScalingGroupName = MyAutoScalingGroup1b MinSize = 0 MaxSize = 0 c. Verify your changes to "MyAutoScalingGroup1b" have taken effect by doing the following: i. ii. d. Call DescribeAutoScalingGroup ("MyAutoScalingGroup1b") to verify that there are no instances left in the group. Call DescribeScalingActivites ("MyAutoScalingGroup1b") to verify that all scaling activities have completed.

Verify your auto scaling activities are successful by doing the following: Call DescribeScalingActivites MyAutoScalingGroup1b to verify that all scaling activities have completed.

e.

Call DeleteAutoScalingGroup with the following parameters:


AutoScalingGroupName = MyAutoScalingGroup1b

3.

Delete the load balancer. Call DeleteLoadBalancer with the following parameters: LoadBalancerName = MyLoadBalancer

The application is completely shut down. For documentation on DeleteLoadBalancer, refer to the API Reference of the Amazon Elastic Load Balancing Developer Guide.

Command Line Tools Example


To shut down an auto-scaled, load balanced application 1. Delete MyAutoScalingGroup1a: a. Use the Auto Scaling as-delete-trigger command to delete the trigger.
PROMPT> as-delete-trigger MyTrigger1a --auto-scaling-group MyAutoScalingGroup1a

Auto Scaling returns the following:


Are you sure you want to delete this trigger? [Ny]

Enter Y to delete the trigger.

Auto Scaling returns the following:


OK-Deleted trigger

b.

Use the Auto Scaling as-update-auto-scaling-group command to change the minimum and maximum size.
as-update-auto-scaling-group MyAutoScalingGroup1a --min-size 0 -maxsize 0

Auto Scaling returns the following


OK-AutoScaling Group updated API Version 2009-05-15 31

Amazon Auto Scaling Developer Guide Shut Down an Auto-Scaled, Load Balanced Application

c.

Verify that there are no instances in your AutoScalingGroup by using the Auto Scaling asdescribe-auto-scaling-groups command.
as-describe-auto-scaling-groups MyAutoScalingGroup1a --headers

Auto Scaling returns the following:

AUTO-SCALING-GROUP GROUP-NAME LAUNCH-CONFIG AVAILABILITY-ZONES MIN-SIZE MAX-SIZE DESIRED-CAPACITY AUTO-SCALING-GROUP MyAutoScalingGroup1c MyLaunchConfiguration east-1c 0 0 0

us-

Call this command repeatedly until there are no more instances remaining in the AutoScalingGroup. d. Verify your scaling activities are Successful by using the Auto Scaling as-describe-scalingactivities command.
as-describe-scaling-activities MyAutoScalingGroup

Auto Scaling returns the following:

ACTIVITY ACTIVITY-ID END-TIME CODE ACTIVITY 74758a33-bfd5-4df... 2009-05-11T16:27:36Z Successful 2009-05-21 10:00:00Z an instance was shutdown." ACTIVITY 74958a77-bfd5-4df... 2009-05-11T16:27:36Z Successful 2009-05-21 10:00:00Z an instance was shutdown."

CAUSE "At "At

e.

Use the Auto Scaling as-delete-auto-scaling-group command.


PROMPT> as-delete-auto-scaling-group MyAutoScalingGroup1a

Auto Scaling returns the following:


Are you sure you want to delete this AutoScalingGroup? [Ny]

Enter Y to delete the trigger.

Auto Scaling returns the following:


OK-Deleted AutoScalingGroup

2.

Delete MyAutoScalingGroup1b: a. Use the Auto Scaling as-delete-trigger command.


PROMPT> as-delete-trigger MyTrigger1b --auto-scaling-group MyAutoScalingGroup1b

Auto Scaling returns the following:


Are you sure you want to delete this trigger? [Ny]y

Enter Y to delete the trigger.

Auto Scaling returns the following:


OK-Deleted trigger API Version 2009-05-15 32

Amazon Auto Scaling Developer Guide Shut Down an Auto-Scaled, Load Balanced Application

b.

Use the Auto Scaling as-update-auto-scaling-group command.


as-update-auto-scaling-group MyAutoScalingGroup1b --min-size 0 -maxsize 0

Auto Scaling returns the following


OK-AutoScaling Group updated

c.

Verify that there are no instances in your AutoScalingGroup by using the Auto Scaling asdescribe-auto-scaling-groups command.

Note
Call this command until there are no more instances remaining in the AutoScalingGroup.

as-describe-auto-scaling-groups MyAutoScalingGroup1b --headers

Auto Scaling returns the following:

AUTO-SCALING-GROUP GROUP-NAME LAUNCH-CONFIG AVAILABILITY-ZONES MIN-SIZE MAX-SIZE DESIRED-CAPACITY AUTO-SCALING-GROUP MyAutoScalingGroup1c MyLaunchConfiguration east-1c 0 0 0

us-

d.

Verify your scaling activities are successful by using the Auto Scaling as-describe-scalingactivities command.
as-describe-scaling-activities MyAutoScalingGroup1b

Auto Scaling returns the following:

ACTIVITY ACTIVITY-ID END-TIME CODE ACTIVITY 74758a33-bfd5-4df... 2009-05-11T16:27:36Z Successful 2009-05-21 10:00:00Z an instance was shutdown." ACTIVITY 74958a77-bfd5-4df... 2009-05-11T16:27:36Z Successful 2009-05-21 10:00:00Z an instance was shutdown."

CAUSE "At "At

e.

Use the Auto Scaling as-delete-auto-scaling-group command.


PROMPT> as-delete-auto-scaling-group MyAutoScalingGroup1b

Auto Scaling returns the following:


Are you sure you want to delete this AutoScalingGroup? [Ny]y

Enter Y to delete the trigger.

Auto Scaling returns the following:


OK-Deleted AutoScalingGroup

3.

Delete the load balancer: Use the Elastic Load Balancing elb-delete-lb command.
PROMPT> API elb-delete-lbVersion 2009-05-15 MyLoadBalancer 33

Amazon Auto Scaling Developer Guide Shut Down an Auto-Scaled, Load Balanced Application

Elastic Load Balancing returns the following:


Warning: Deleting a LoadBalancer can lead to service disruption to any customers connected to the LoadBalancer. Are you sure you want to delete this LoadBalancer? [Ny]

Enter Y to delete the Load Balancer

Elastic Load Balancing returns the following:


OK-Deleting LoadBalancer

The application is completely shut down.

Give Us Your Feedback


Your input is important to us to help make our documentation helpful and easy to use. Please take a minute to give us your feedback on how well we were able to help you use Auto Scaling. Just click this feedback link. Thank you.

API Version 2009-05-15 34

Amazon Auto Scaling Developer Guide Troubleshooting Applications

Troubleshooting Applications
Topics Retrieving Errors (p. 35) Troubleshooting Tips (p. 35)

Auto Scaling provides specific and descriptive errors to help you troubleshoot problems.

Retrieving Errors
Typically, you want your application to check if a request generated an error before processing results. The easiest way to find out if an error occurred is to look for an Error node in the response. XPath syntax provides a simple way to search for the presence of an Error node, as well as an easy way to retrieve the error code and message. The following code snippet uses Perl and the XML::XPath module to determine whether an error occurred during a request. If an error occurred, the code prints the first error code and message in the response.
use XML::XPath; my $xp = XML::XPath->new(xml =>$response); if ( $xp->find("//Error") ) {print "There was an error processing your request:\n", " Error code: ", $xp->findvalue("//Error[1]/Code"), "\n", " ", $xp->findvalue("//Error[1]/Message"), "\n\n"; }

Troubleshooting Tips
We recommend the following processes to diagnose and resolve problems with your Auto Scaling applications: Verify that Auto Scaling is running correctly. Verify that your XSL style sheets are valid. To do this, run your requests both with and without the XSL style sheet, to determine if the problem is in the request or in your style sheets. Check the structure of your request. Each Auto Scaling operation has a reference page. Double-check that you are using parameters correctly. Try the request on one of the other locales, if there are other locales. Try your request with SOAP through your browser. That will help you determine if the problem lies with your code or your request or with autoscaling. Look at the sample applications and use cases to see if those examples are performing similar operations.

API Version 2009-05-15 35

Amazon Auto Scaling Developer Guide WSDL Locations

API Reference

Topics WSDL Locations (p. 36) API Conventions (p. 37) Common Request Parameters (p. 38) Error Codes (p. 40) Auto Scaling Operations (p. 44) Data Types (p. 83) The following sections of the guide provide reference material for Auto Scaling. For more information about any concepts or programming tasks associated with the reference material, refer to the previous sections in this guide.

WSDL Locations
The WSDL for Auto Scaling is located at each Region: Region US-East (Northern Virginia) Region US-West (Northern California) Region EU (Ireland) Region Asia Pacific (Singapore) Region URL http://autoscaling.us-east-1.amazonaws.com/doc/2009-05-15/ AutoScaling.wsdl http://autoscaling.us-west-1.amazonaws.com/doc/2009-05-15/ AutoScaling.wsdl http://autoscaling.eu-west-1.amazonaws.com/doc/2009-05-15/ AutoScaling.wsdl http://autoscaling.ap-southeast-1.amazonaws.com/doc/2009-05-15/ AutoScaling.wsdl
API Version 2009-05-15 36

Amazon Auto Scaling Developer Guide API Conventions

API Conventions
Data Types and Auto Scaling WSDL
Values provided as parameters to the various operations must be of the indicated type. Standard XSD types (like string, boolean, int) are prefixed with xsd:. Complex types defined by the Auto Scaling WSDL are prefixed. Please look at the individual WSDL for guidance..

Note
The following example uses an EC2 element, not an element from this service. However, the information here using this example is still valid. For example, the <imagesSet> element in the following XML snippet is of type xsd:string[].
<imagesSet> <item> <imageId>ami-61a54008</imageId> </item> <item> <imageId>ami-61b54608</imageId> </item> </imagesSet>

The <instancesSet> element in the following XML snippet is of type xsd:string[].


<instancesSet> <item> <imageId>ami-60a54009</imageId> <minCount>10</minCount> <maxCount>30</maxCount> </item> <item> <imageId>ami-60b54209</imageId> <minCount>5</minCount> <maxCount>20</maxCount> </item> </instancesSet>

Parameter Lists
Some API operations take lists of parameters. These lists are specified using the following notation: param.member.n. Values of n are integers starting from 1. All lists of parameters must follow this notation, including lists that only contain one parameter. For example, a Query parameter list looks like this:
&attribute.member.1=this &attribute.member.2=that

API Version 2009-05-15 37

Amazon Auto Scaling Developer Guide Common Request Parameters

Common Request Parameters


All Query operations share a set of common parameters that must be present in each call: Name
Action

Description Indicates the action to perform. Default: none Example: CreateAutoScalingGroup The Access Key ID for the request sender. This identifies the account which will be charged for usage of the service. The account with which the Access Key ID is associated must be signed up for Auto Scaling, or requests will not be accepted. Default: none Example: 10QMXFEV71ZS32XQFTR2 The date and time at which the signature included in the request expires, in the format YYYY-MMDDThh:mm:ssZ. Condition: Requests must include either Expires or Timestamp, but cannot contain both. Default: none Example: 2009-01-07T15:04:56Z The date and time at which the request is signed, in the format YYYY-MM-DDThh:mm:ssZ. For more information, go to ISO 8601. Condition: Requests must include either Timestamp or Expires, but cannot contain both. Default: none Example: 2009-01-07T15:04:56Z The request signature. For more information, see Request Authentication (p. 14). Default: none Example: Qnpl4Qk/7tINHzfXCiT7VbBatDA= The hash algorithm you use to create the request signature. Valid values: HmacSHA256 | HmacSHA1. For more information, see Request Authentication (p. 14). Default: none Example: HmacSHA256 The signature version you use to sign the request. Set this value to 2. For more information, see Request Authentication (p. 14). Default: none Example: 2 The API version to use, as specified in the WSDL. Default: none Example: 2009-05-15

Required Yes

AWSAccessKeyId

Yes

Expires

Conditional

Timestamp

Conditional

Signature

Yes

SignatureMethod

Yes

SignatureVersion

Yes

Version

Yes

API Version 2009-05-15 38

Amazon Auto Scaling Developer Guide Common Request Parameters

Note
The Timestamp parameter can be used instead of Expires. Requests must include either Timestamp or Expires, but cannot contain both. Parameter values must be URL-encoded. This is true for any Query parameter passed to Auto Scaling; and is typically necessary in the Signature parameter. Some clients do this automatically, but this is not the norm.

Note
Some API operations take lists of parameters. These lists are specified using the following notation: param.member.n. Values of n are integers starting from 1. All lists of parameters must follow this notation, including lists that only contain one parameter. For example, a Query parameter list looks like this:
&attribute.member.1=this &attribute.member.2=that

API Version 2009-05-15 39

Amazon Auto Scaling Developer Guide Error Codes

Error Codes
Topics Overview (p. 40) Auto Scaling Client Error Codes (p. 40) Common Server Error Codes (p. 41) Common Client Error Codes (p. 41)

Overview
There are two types of error codes: client and server. Client error codes suggest that the error was caused by something the client did, such as an authentication failure or an invalid parameter. In the SOAP API, these error codes are prefixed with Client. For example: Client.AuthFailure. In the Query API, these errors are accompanied by a 400-series HTTP response code. Server error codes suggest a server-side issue caused the error and should be reported. In the SOAP API, these error codes are prefixed with Server. For example: Server.Unavailable. In the Query API, these errors are accompanied by a 500-series HTTP response code.

Auto Scaling Client Error Codes


Amazon EC2 specific error codes are not listed. For more information on EC2 and EC2 error codes, go to the Amazon EC2 Product Documentation. Error Code Description HTTP Status Code SOAP Fault Code Prefix

AlreadyExists

The named AutoScalingGroup or launch configuration already exists. The quota for capacity groups or launch configurations for this customer has already been reached. This is returned when you cannot delete a launch configuration or auto scaling group because it is being used. You cannot delete an AutoScalingGroup while there are scaling activities in progress for that group.

400 Client Bad Request 400 Client Bad Request

LimitExceeded

ResourceInUse

400 Client Bad Request

ScalingActivityInProgress

400 Client Bad Request

API Version 2009-05-15 40

Amazon Auto Scaling Developer Guide Common Server Error Codes

Error Code

Description

HTTP Status Code

SOAP Fault Code Prefix

ValidationError

A request parameter was invalid.

400 Client Bad Request

Common Server Error Codes


The following server errors are common across all the services and might be returned in addition to the specific errors listed for each service. Error Code Description HTTP Status Code 500 Internal Failure Error 503 Service Unavailable SOAP Fault Code Prefix Server

InternalFailure

Indicates that the request processing has failed due to some unknown error, exception or failure. Indicates that the request has failed due to a temporary failure of the server.

ServiceUnavailable

Server

Common Client Error Codes


The following client errors are common across all the services and might be returned in addition to the specific errors listed for each service. Error Code Description HTTP Status Code SOAP Fault Code Prefix Client

ElementNotSigned

An element that is marked/configured to be signed is not signed (AWS SOAP only).

403 Forbidden

IncompleteSignature

The request signature 400 Bad does not conform to AWS Request standards. The action or operation requested is invalid. 400 Bad Request

Client

InvalidAction

Client Client

InvalidClientTokenId

The x.509 certificate or 403 Forbidden AWS Access Key ID provided does not exist in our records. Parameters that must not be used together were used together. 400 Bad Request

InvalidParameterCombination

Client

API Version 2009-05-15 41

Amazon Auto Scaling Developer Guide Common Client Error Codes

Error Code

Description

HTTP Status Code

SOAP Fault Code Prefix Client

InvalidParameterValue

Bad or out of range value 400 Bad was supplied for the input Request parameter. AWS query string is malformed, does not adhere to AWS standards. The security token provided in the input is missing or expired (AWS SOAP only). 400 Bad Request

InvalidQueryParameter

Client

InvalidSecurity

403 Forbidden

Client

InvalidSecurityToken

Incorrect or invalid data is 400 Bad supplied for the security Request token. The SOAP request is invalid or malformed. The request is invalid or malformed. The query string is malformed. The signature element in the SOAP request is malformed. The request is missing an action or operation parameter. Request must contain either a valid (registered) AWS Access Key ID or x.509 certificate. An input parameter that is mandatory for processing the request is not supplied. The AWS Access Key ID needs a subscription for the service Request is past expires date or more than 15 minutes past request date. 400 Bad Request 400 Bad Request 400 Bad Request 400 Bad Request 400 Bad Request 403 Forbidden

Client

InvalidSOAPRequest

Client Client Client Client

MalformedInput

MalformedQueryString

MalformedSOAPSignature

MissingAction

Client

MissingAuthenticationToken

Client

MissingParameter

400 Bad Request

Client

OptInRequired

403 Forbidden

Client

RequestExpired

400 Bad Request

Client

API Version 2009-05-15 42

Amazon Auto Scaling Developer Guide Common Client Error Codes

Error Code

Description

HTTP Status Code

SOAP Fault Code Prefix Client

RequiresSSL

The request must be made over SSL connection. Request was denied due to request throttling. More than one credential received in the WSSecurity header of the request. The BinarySecurityToken is not base64 encoded. More than one x.509 binary security token received in WS-Security header of the request. The envelope namespace used to define the SOAP request is invalid.

401 Unauthorized 400 Bad Request 400 Bad Request

Throttling

Client Client

WSSecurityMultipleCredentialError

WSSecurityEncodingTypeError

400 Bad Request 400 Bad Request

Client Client

WSSecurityMultipleX509Error

UnknownEnvelopeNamespace

400 Bad Request

Client

API Version 2009-05-15 43

Amazon Auto Scaling Developer Guide Auto Scaling Operations

Auto Scaling Operations


The following operations (by group) are available from Auto Scaling. AutoScalingGroup Operations: CreateAutoScalingGroup (p. 45) DeleteAutoScalingGroup (p. 58) DescribeAutoScalingGroups (p. 65) SetDesiredCapacity (p. 76) UpdateAutoScalingGroup (p. 80) Launch Configuration Operations CreateLaunchConfiguration (p. 49) DeleteLaunchConfiguration (p. 61) DescribeLaunchConfigurations (p. 67) Trigger Operations: CreateOrUpdateScalingTrigger (p. 53) DescribeTriggers (p. 73) DeleteTrigger (p. 63) Scaling Activity Operations: DescribeScalingActivities (p. 70) Instance and Instance Workflow Operations: TerminateInstanceInAutoScalingGroup (p. 78)

API Version 2009-05-15 44

Amazon Auto Scaling Developer Guide CreateAutoScalingGroup

CreateAutoScalingGroup
Description
Creates a new AutoScalingGroup with the specified name. You must not have already used up your entire quota of AutoScalingGroups in order for this call to be successful. Once the creation request is completed, the AutoScalingGroup is ready to be used in other calls.

Request Parameters
Name
AutoScalingGroupName

Description Name of AutoScalingGroup. Type: String Default: None Constraints: Must contain less than 256 alphanumeric characters. Must be unique within your Amazon Web Services (AWS) account

Required Yes

AvailabilityZones

Availability Zones for the group. Type: AvailabilityZones (p. 90) Default: None Constraints: Must contain a list of one or more valid Availability Zones

Yes

Note
For information on passing parameter lists, see Parameter Lists (p. 37).
Cooldown

The amount of time after a scaling activity completes before any further trigger-related scaling activities can start. Time is in seconds. Type: Integer Default: 0

No

LaunchConfigurationName

Name of launch configuration to use with group. Type: String Default: None

Yes

LoadBalancerNames

List of LoadBalancers to use. Type: LoadBalancerNames (p. 100) Constraints: LoadBalancer must exist in the Elastic Load Balancing Service, within the scope of caller's AWS account.
API Version 2009-05-15 45

No

Amazon Auto Scaling Developer Guide CreateAutoScalingGroup

Name
MinSize

Description Minimum size of group. Type: Integer Default: None Constraints: Must be a positive integer no greater than MaxSize

Required Yes

Note
If you set the minimum size of the group to zero, and the group has a trigger that is based on a metric produced by itself, the trigger can drive the instance count to zero. In this case, the service will never restart itself without manual intervention, since there are no instances running to generate metrics.
MaxSize

Maximum size of the group. Type: Integer Default: None Constraints: Must be a positive integer that is less than 10000. Maximum number of EC2 instances allowed for caller has not been exceeded.

Yes

Note
No error will be thrown if you set MaxSize to greater than your EC2 instance limit. However, the maximum AutoScalingGroup size will be limited by the smaller of this value and your EC2 maximum.

Response Elements
Only Request Id metadata is returned.

Special Errors
For information on common errors for all calls, see API Error Codes (p. 40).

API Version 2009-05-15 46

Amazon Auto Scaling Developer Guide CreateAutoScalingGroup

Error

Description

HTTP Status Code 400 Bad Request

SOAP Prefix Client

AlreadyExists

The named AutoScalingGroup already exists for this AWS account. The quota for AutoScalingGroups for this account has already been reached for this AWS account.. An request parameter was invalid. For example, the specified Availability Zone or launch configuration could not be found, or the MinSize is larger than the MaxSize.

LimitExceeded

400 Bad Request

Client

ValidationError

400 Bad Request

Client

Examples
Sample Request
Example Request (Query)

http://autoscaling.amazonaws.com/ ?AutoScalingGroupName=webtier &LaunchConfigurationName=wt20080929 &MinSize=0 &MaxSize=2 &Cooldown=0 &AvailabilityZones.member.1=us-east-1c &Action=CreateAutoScalingGroup &Version=2009-05-15 &AWSAccessKeyId=XXX YOUR ACCESS KEY XXX &SignatureVersion=2 &SignatureMethod=HmacSHA1 &Timestamp=2009-01-13T00%3A38%3A54.000Z &Signature=XXX YOUR SIGNATURE XXX%3D

Sample Response

API Version 2009-05-15 47

Amazon Auto Scaling Developer Guide CreateAutoScalingGroup

Example Query Response


<CreateAutoScalingGroupResponse xmlns="http://autoscaling.amazonaws.com/ doc/2009-05-15/"> <ResponseMetadata> <RequestId>8e1b4fc7-e10a-11dd-a73e- 2d774d6aee71</RequestId> </ResponseMetadata> </CreateAutoScalingGroupResponse>

Related Operations
DeleteAutoScalingGroup (p. 58) UpdateAutoScalingGroup (p. 80) SetDesiredCapacity (p. 76)

API Version 2009-05-15 48

Amazon Auto Scaling Developer Guide CreateLaunchConfiguration

CreateLaunchConfiguration
Description
Creates a new Launch Configuration (p. 7). Please note that the launch configuration name used must be unique, within the scope of your AWS account, and the maximum limit of launch configurations must not yet have been met, or else the call will fail. Once created, the new launch configuration is available for immediate use.

Request Parameters
Name
ImageId

Description Unique ID of the Amazon Machine Image (AMI) which was assigned during registration. For more information about Amazon EC2 images, go to the Amazon EC2 product documentation. Type: String Default: None

Required Yes

KeyName

The name of the EC2 key pair. Type: String Default: None

No

LaunchConfigurationName

Name of the launch configuration to create. Type: String Default: None

Yes

SecurityGroups

Names of the security groups with which to associate the EC2 instances. For more information about Amazon EC2 security groups, go to the Amazon EC2 product documentation. Type: SecurityGroups (p. 101)

No

Note
For information on passing parameter lists, see Parameter Lists (p. 37).

API Version 2009-05-15 49

Amazon Auto Scaling Developer Guide CreateLaunchConfiguration

Name
UserData

Description The user data available to the launched EC2 instances. For more information on Amazon EC2 user data, go to the Amazon EC2 product documentation. Type: String Default: None Constraint: The data must be base64 encoded as described in RFC354. For more information, refer to the Amazon Elastic Compute Cloud Developer Guide.

Required No

InstanceType

This specifies the instance type of the EC2 instance. For more information on Amazon EC2 instance types, go to the Amazon EC2 product documentation. Type: String Default: ml.small

Yes

KernelId

ID of the kernel associated with the EC2 AMI. Type: String Default: None

No

RamdiskId

ID of the RAM disk associated with the EC2 AMI.. Type: String Default: None

No

BlockDeviceMappings

Specifies how block devices are exposed to the instance. Each mapping is made up of a VirtualName and a DeviceName. For more information on BlockDeviceMappings, go to the Amazon EC2 product documentation. Default: None

No

Note
For information on passing parameter lists, see Parameter Lists (p. 37).

Response Elements
Only Request Id metadata is returned.

Special Errors
For information on common errors for all calls, see API Error Codes (p. 40).
API Version 2009-05-15 50

Amazon Auto Scaling Developer Guide CreateLaunchConfiguration

Error

Description

HTTP Status Code 400 Bad Request

SOAP Prefix

AlreadyExists

The launch configuration name specified is a duplicate for this AWS account. The number of launch configurations has exceeded the maximum allowed. A request parameter was invalid. For example, the AMI or Security Group was not found.

Client

LimitExceeded

400 Bad Request

Client

ValidationError

400 Bad Request

Client

Examples
Sample Request
Example Request (Query)

http://autoscaling.amazonaws.com/?LaunchConfigurationName=wt20080929 &ImageId=ami-f7c5219e &InstanceType=m1.small &Action=CreateLaunchConfiguration &Version=2009-05-15 &AWSAccessKeyId=XXX YOUR ACCESS KEY XXX &SignatureVersion=2 &SignatureMethod=HmacSHA1 &Timestamp=2009-01-13T00%3A35%3A31.000Z &Signature=XXX YOUR SIGNATURE XXX%3D

Sample Response
Example Query Response
<CreateLaunchConfigurationResponse xmlns="http://autoscaling.amazonaws.com/ doc/2009-05-15/"> <ResponseMetadata> <RequestId>1539e116-e10a-11dd-a73e- 2d774d6aee71</RequestId> </ResponseMetadata> </CreateLaunchConfigurationResponse>

Related Operations
DeleteLaunchConfiguration (p. 61)
API Version 2009-05-15 51

Amazon Auto Scaling Developer Guide CreateLaunchConfiguration

API Version 2009-05-15 52

Amazon Auto Scaling Developer Guide CreateOrUpdateScalingTrigger

CreateOrUpdateScalingTrigger
Description
This call sets the parameters that governs when and how to scale an AutoScalingGroup (p. 6). If specified trigger is updated if it already exists within the scope of the caller's AWS account. If a trigger with a different name already exists, this call fails.

Request Parameters
Name
AutoScalingGroupName

Description The name of the AutoScalingGroup to be associated with the trigger. Type: String Default: None Valid Values: the AutoScalingGroup must exist (within the scope of the caller's AWS account) Constraints: see Valid Values above

Required Yes

Dimensions

A list of dimensions associated with the metric used by the trigger to determine whether to fire. For more information on Amazon CloudWatch, go to the Amazon CloudWatch product documentation. Type: Dimensions (p. 94) Default: None

Yes

Note
For information on passing parameter lists, see Parameter Lists (p. 37).
Namespace

A list of dimensions associated with the metric used by the trigger to determine whether to fire. For more information on Amazon CloudWatch, go to the Amazon CloudWatch product documentation. Type: Dimensions (p. 94) Default: None

Yes

Note
For information on passing parameter lists, see Parameter Lists (p. 37).

API Version 2009-05-15 53

Amazon Auto Scaling Developer Guide CreateOrUpdateScalingTrigger

Name
MeasureName

Description The measure name associated with the metric used by the trigger to determine when to fire; for example, CPU, network I/O, or disk I/O. For more information on Amazon CloudWatch, go to the Amazon CloudWatch product documentation. Type: String Default: None Valid Values: CPUUtilization | NetworkIn | NetworkOut | DiskWriteOps | DiskReadBytes | DiskReadOps | DiskWriteBytes

Required Yes

Statistic

The statistic that the trigger uses when fetching metric statistics to examine. Type: String Default: None Valid Values: Minimum | Maximum | Sum | Average

Yes

Period

The period associated with the metric statistics in seconds. Type: integer Default: None Constraints: must be a multiple of 60

Yes

TriggerName

The name for this trigger. Type: String Default: None Constraints: Must be an alphanumeric string. Must be unique within the scope of the associated AutoScalingGroup.

Yes

Unit

The standard unit of measurement for a given measure that the trigger uses when fetching metric statistics to examine. Type: StandardUnit Default: None Valid Values: Seconds | Percent | Bytes | Bits | Count | Bytes/Second | Bits/Second | Count/ Second | None.

No

API Version 2009-05-15 54

Amazon Auto Scaling Developer Guide CreateOrUpdateScalingTrigger

Name
CustomUnit

Description The user-defined custom unit for a given measure. This is used by the trigger when fetching the metric statistics it uses to determine whether to activate.

Required No

Note
Custom units are currently not available. Type: string Default: None
LowerThreshold

The lower limit for the metric. If all data points in the last BreachDuration seconds exceed the upper threshold or fall below the lower threshold, the trigger activates. Type: double Default: None

Yes

LowerBreachScaleIncrement

The incremental amount to use when performing scaling activities when the lower threshold has been breached. Type: String Default: None Constraints: Must be a positive or negative integer followed by a % sign.

Yes

Note
If you specify only a positive or negative number, then the AutoScalingGroup increases or decreases by the specified number of actual instances. If you specify a positive or negative number with a percent sign, the AutoScaling group increases or decreases by the specified percentage.
UpperThreshold

The upper limit for the metric. If all data points in the last BreachDuration seconds exceed the upper threshold or fall below the lower threshold, the trigger activates. Type: Double Default: None

Yes

API Version 2009-05-15 55

Amazon Auto Scaling Developer Guide CreateOrUpdateScalingTrigger

Name
UpperBreachScaleIncrement

Description The incremental amount to use when performing scaling activities when the upper threshold has been breached. Type: String Default: None

Required Yes

Note
If you specify only a positive or negative number, then the AutoScalingGroup will increase or decrease by the specified number of actual instances. If you specify a positive or negative number with a percent sign, the AutoScaling group will increase or decrease by the specified percentage.
BreachDuration

The amount of time in seconds used to evaluate Yes and determine if a breach is occurring. The service will look at data between the current time and the number of seconds specified in this parameter to see if a breach has occurred. Type: Integer Default: None Constraints: Must be a multiple of 60

Response Elements
Only Request ID metadata is returned.

Special Errors
For information on common errors for all calls, see API Error Codes (p. 40). Error Description HTTP Status Code 404 Bad Request 400 Bad Request SOAP Prefix

LimitExceeded

A trigger already exists. AutoScalingGroups are limited to one trigger. One or more of the specified parameters are invalid.

Client

ValidationError

Client

Examples
API Version 2009-05-15 56

Amazon Auto Scaling Developer Guide CreateOrUpdateScalingTrigger

Sample Request
Example Request (Query)

http://autoscaling.amazonaws.com/ ?TriggerName=tenpct &AutoScalingGroupName=webtier &MeasureName=CPUUtilization &Statistic=Average &Dimensions.member.1.Name=AutoScalingGroupName &Dimensions.member.1.Value=webtier &Namespace=AWS/EC2 &Period=60 &Unit=None &LowerThreshold=0 &LowerBreachScaleIncrement=-1 &UpperThreshold=60 &UpperBreachScaleIncrement=1 &BreachDuration=300 &Action=CreateOrUpdateScalingTrigger &Version=2009-05-15 &AWSAccessKeyId=XXX YOUR ACCESS KEY XXX &SignatureVersion=2 &SignatureMethod=HmacSHA1 &Timestamp=2009-01-13T00%3A44%3A19.000Z &Signature=XXX YOUR SIGNATURE XXX%3

Sample Response
Example Query Response
<CreateOrUpdateScalingTriggerResponse xmlns="http:// autoscaling.amazonaws.com/doc/2009-05-15/"> <ResponseMetadata> <RequestId>503d309d-e10b-11dd-a73e-2d774d6aee71</RequestId> </ResponseMetadata> </CreateOrUpdateScalingTriggerResponse>

Related Operations
DeleteTrigger (p. 63) DescribeTrigger (p. 73)

API Version 2009-05-15 57

Amazon Auto Scaling Developer Guide DeleteAutoScalingGroup

DeleteAutoScalingGroup
Description
Deletes all configuration for the specified AutoScalingGroup and deletes the group. In order to successfully call this API, no triggers can be currently in progress. Once this call successfully executes, no further triggers will begin, and the specified AutoScalingGroup will not be available for use in other API calls.

Note
You cannot delete an AutoScalingGroup if it contains instances or there are scaling activities in progress. Before attempting to delete an AutoScalingGroup, you should use the UpdateAutoScalingGroup (p. 80) API to set the minimum and maximum size of the AutoScalingGroup to zero. This will remove all instances and avoid problems with a previously set trigger preventing the deletion of the AutoScalingGroup.

Request Parameters
Name
AutoScalingGroupName

Description Name of AutoScalingGroup to be deleted. Type: String Default: None

Required Yes

Response Elements
<DeleteAutoScalingGroup xmlns="http://autoscaling.amazonaws.com/ doc/2009-05-15/"> <ResponseMetadata> <RequestId>e64fc4c3-e10b-11dd-a73e-2d774d6aee71</RequestId> </ResponseMetadata> </DeleteAutoScalingGroupResponse>

Special Errors
For a list of common errors for all calls, see API Error Codes (p. 40). Error Description HTTP Status Code 400 Bad Request SOAP Prefix

ResourceInUse

This is returned when you cannot delete a launch configuration or auto scaling group because it is being used. HTTP code is 400.
API Version 2009-05-15 58

Client

Amazon Auto Scaling Developer Guide DeleteAutoScalingGroup

Error

Description

HTTP Status Code 400 Bad Request

SOAP Prefix

ScalingActivityInProgress

You cannot delete an AutoScalingGroup while there are scaling activities in progress for that group. The requested AutoScalingGroup was not found.

Client

ValidationError

400 Bad Request

Client

Examples
Sample Request
Example Request (Query)

http://autoscaling.amazonaws.com/ ?AutoScalingGroupName=webtier &Action=DeleteAutoScalingGroup &Version=2009-05-15 &AWSAccessKeyId=XXX YOUR ACCESS KEY XXX &SignatureVersion=2 &SignatureMethod=HmacSHA1 &Timestamp=2009-01-13T00%3A48%3A09.000Z &Signature=XXX YOUR SIGNATURE XXX%3D

Sample Response
Example Query Response
Only RequestId metadata is returned. <DeleteAutoScalingGroupResponse xmlns="http://autoscaling.amazonaws.com/ doc/2009-05-15/"> <ResponseMetadata> <RequestId>d96de2d5-e10b-11dd-a73e- 2d774d6aee71</RequestId> </ResponseMetadata> </DeleteAutoScalingGroupResponse>

Related Operations
CreateAutoScalingGroup (p. 45) SetDesiredCapacity (p. 76) DescribeScalingActivities (p. 70)
API Version 2009-05-15 59

Amazon Auto Scaling Developer Guide DeleteAutoScalingGroup

API Version 2009-05-15 60

Amazon Auto Scaling Developer Guide DeleteLaunchConfiguration

DeleteLaunchConfiguration
Description
Deletes the specified LaunchConfiguration. The specified launch configuration must not be currently attached to any auto scaling group. Once this call completes, the launch configuration is no longer available for use.

Request Parameters
Name
LaunchConfigurationName

Description Launch configuration to be deleted. Type: String Default: None Constraints: The specified launch configuration cannot be attached to any AutoScalingGroup.

Required Yes

Response Elements
Only Request Id metadata is returned.

Special Errors
For a list of common errors for all calls, see API Error Codes (p. 40). Error Description HTTP Status Code 400 Bad Request SOAP Prefix

ResourceInUse

Returned when you cannot delete a launch configuration or auto scaling group because it is being used. The launch configuration was not found.

Client

ValidationError

400 Bad Request

Client

Examples
Sample Request

API Version 2009-05-15 61

Amazon Auto Scaling Developer Guide DeleteLaunchConfiguration

Example Request (Query)

http://autoscaling.amazonaws.com/ ?LaunchConfigurationName=wt20080929 &Action=DeleteLaunchConfiguration &Version=2009-05-15 &AWSAccessKeyId=XXX YOUR ACCESS KEY XXX &SignatureVersion=2 &SignatureMethod=HmacSHA1 &Timestamp=2009-01-13T00%3A48%3A31.000Z &Signature=XXX YOUR SIGNATURE XXX%3D

Sample Response
Example Query Response
<DeleteLaunchConfigurationResponse xmlns="http://autoscaling.amazonaws.com/ doc/2009-05-15/"> <ResponseMetadata> <RequestId>e64fc4c3-e10b-11dd-a73e-2d774d6aee71</RequestId> </ResponseMetadata> </DeleteLaunchConfigurationResponse>

Related Operations
CreateLaunchConfiguration (p. 49)

API Version 2009-05-15 62

Amazon Auto Scaling Developer Guide DeleteTrigger

DeleteTrigger
Description
Deletes the specified trigger. If a trigger is currently in progress, it continues to run until its activities are complete.

Request Parameters
Name
AutoScalingGroupName

Description Name of the AutoScalingGroup associated with the trigger. The AutoScalingGroup must exist within the scope of the caller's AWS account. Type: String Default: None

Required Yes

TriggerName

Name of the trigger to be deleted. The trigger must exist within the scope of the caller's AWS account. An in-progress trigger will continue until completion. Type: String Default: None

Yes

Response Elements
<DeleteTrigger xmlns="http://autoscaling.amazonaws.com/doc/2009-05-15/"> <ResponseMetadata> <RequestId>e64fc4c3-e10b-11dd-a73e-2d774d6aee71</RequestId> </ResponseMetadata> </DeleteTeiggerResponse>

Special Errors
For a list of common errors for all calls, see API Error Codes (p. 40). Error Description HTTP Status Code 400 Bad Request SOAP Prefix

ValidationError

The specified trigger was not found.

Client

Examples
Sample Request
API Version 2009-05-15 63

Amazon Auto Scaling Developer Guide DeleteTrigger

Example Request (Query)

http://autoscaling.amazonaws.com/ ?AutoScalingGroupName=webtier &TriggerName=tenpct &Action=DeleteTrigger &Version=2009-05-15 &AWSAccessKeyId=XXX YOUR ACCESS KEY XXX &SignatureVersion=2 &SignatureMethod=HmacSHA1 &Timestamp=2009-01-13T00%3A47%3A48.000Z &Signature=XXX YOUR SIGNATURE XXX%3D

Sample Response
Example Query Response
Only RequestId metadata is returned. <DeleteTriggerResponse xmlns="http://autoscaling.amazonaws.com/ doc/2009-05-15/"> <ResponseMetadata> <RequestId>cca38097-e10b-11dd-a73e-2d774d6aee71</RequestId> </ResponseMetadata> </DeleteTriggerResponse>

Related Operations
CreateOrUpdateScalingTrigger (p. 53)

API Version 2009-05-15 64

Amazon Auto Scaling Developer Guide DescribeAutoScalingGroups

DescribeAutoScalingGroups
Description
Returns a full description of the AutoScalingGroups from the given list. This includes all Amazon EC2 instances that are members of the group. If a list of names is not provided, then the full details of all AutoScalingGroups is returned.

Request Parameters
Name
AutoScalingGroupNames

Description

Required

List of AutoScalingGroups from which to retrieve No status information. Type: AutoScalingGroups (p. 89) Default: None Default: retrieve all Constraints: group names must exist

Note
For information on passing parameter lists, see Parameter Lists (p. 37).

Response Elements
Name AutoScalingGroups Description List containing information for each AutoScalingGroup. Type: AutoScalingGroups (p. 89) Availability: Always returned

Special Errors
For a list of common errors for all calls, see API Error Codes (p. 40).

Examples
Sample Request

API Version 2009-05-15 65

Amazon Auto Scaling Developer Guide DescribeAutoScalingGroups

Example Request (Query)

http://autoscaling.amazonaws.com/ ?AutoScalingGroupNames.member.1=webtier &Action=DescribeAutoScalingGroups &Version=2009-05-15 &AWSAccessKeyId=XXX YOUR ACCESS KEY XXX &SignatureVersion=2 &SignatureMethod=HmacSHA1 &Timestamp=2009-01-13T00%3A45%3A14.000Z &Signature=XXX YOUR SIGNATURE XXX%3D

Sample Response
Example Query Response
<DescribeAutoScalingGroupsResponse xmlns="http://autoscaling.amazonaws.com/ doc/2009-05-15/"> <DescribeAutoScalingGroupsResult> <AutoScalingGroups> <member> <MinSize>0</MinSize> <CreatedTime>2009-01-13T00:38:54Z</CreatedTime> <AvailabilityZones> <member>us-east-1c</member> </AvailabilityZones> <Cooldown>0</Cooldown> <LaunchConfigurationName>wt20080929</LaunchConfigurationName> <AutoScalingGroupName>webtier</AutoScalingGroupName> <DesiredCapacity>1</DesiredCapacity> <Instances> <member> <InstanceId>i-8fa224e6</InstanceId> <LifecycleState>InService</LifecycleState> <AvailabilityZone>us-east-1c</AvailailityZone> </member> </Instances> <MaxSize>1</MaxSize> </member> </AutoScalingGroups> </DescribeAutoScalingGroupsResult> <ResponseMetadata> <RequestId>70f2e8af-e10b-11dd-a73e-2d774d6aee71</RequestId> </ResponseMetadata> </DescribeAutoScalingGroupsResponse>

Related Operations
DescribeScalingActivities (p. 70) DescribeLaunchConfigurations (p. 67) DescribeTrigger (p. 73)

API Version 2009-05-15 66

Amazon Auto Scaling Developer Guide DescribeLaunchConfigurations

DescribeLaunchConfigurations
Description
Returns a full description of the launch configurations given the specified names. If no names are specified, then the full details of all launch configurations are returned. For more information on launch configurations, see Launch Configuration (p. 7).

Request Parameters
Name
LaunchConfigurationNames

Description List of the launch configurations for which details are requested. Any specified launch configuration that cannot be found are omitted from the returned results. Type: LaunchConfigurationNames (p. 98) Default: All launch configurations are returned.

Required No

Note
For information on passing parameter lists, see Parameter Lists (p. 37).
MaxRecords

The maximum number of scaling activities to return. Type: Integer Default: 100 Constraints: Value must be greater than 10 and less than 100

Yes

NextToken

String value that specifies where to start the list of scaling activities for pagination of long results.

No

Response Elements
Name
LaunchConfigurations

Description List of structures containing information on each of the returned launch configurations. Type: LaunchConfigurations (p. 99) Availability: Always returned

NextToken

Set to a non-empty string if there are results past the ones we returned. Feed this to future requests to get the rest.

API Version 2009-05-15 67

Amazon Auto Scaling Developer Guide DescribeLaunchConfigurations

Special Errors
For a list of common errors for all calls, see API Error Codes (p. 40).

Examples
Sample Request
Example Request (Query)

http://autoscaling.amazonaws.com/ ?LaunchConfigurationNames.member.1=wt20080929 &Action=DescribeLaunchConfigurations &Version=2009-05-15 &AWSAccessKeyId=XXX YOUR ACCESS KEY XXX &SignatureVersion=2 &SignatureMethod=HmacSHA1 &Timestamp=2009-01-13T00%3A36%3A12.000Z &Signature=XXX YOUR SIGNATURE XXX%3D

Sample Response
Example Query Response
<DescribeLaunchConfigurationsResponse xmlns="http:// autoscaling.amazonaws.com/doc/2009-05-15/"> <DescribeLaunchConfigurationsResult> <LaunchConfigurations> <member> <InstanceType>m1.small</InstanceType> <BlockDeviceMappings/> <KeyName/> <SecurityGroups/> <ImageId>ami-f7c5219e</ImageId> <RamdiskId/> <CreatedTime>2009-01-13T00:35:31Z</CreatedTime> <KernelId/> <LaunchConfigurationName>wt20080929</LaunchConfigurationName> <UserData/> </member> </LaunchConfigurations> </DescribeLaunchConfigurationsResult> <ResponseMetadata> <RequestId>2e14cb6c-e10a-11dd-a73e-2d774d6aee71</RequestId> </ResponseMetadata> </DescribeLaunchConfigurationsResponse>

Related Operations
DescribeAutoScalingGroups (p. 65)
API Version 2009-05-15 68

Amazon Auto Scaling Developer Guide DescribeLaunchConfigurations

DescribeScalingActivities (p. 70) DescribeTrigger (p. 73)

API Version 2009-05-15 69

Amazon Auto Scaling Developer Guide DescribeScalingActivities

DescribeScalingActivities
Description
Returns the scaling activities specified for the given group. If the input list is empty, all the activities from the past six weeks are returned. Activities will be sorted by completion time. Activities that have no completion time are considered as using the most recent possible time. For more information on scaling activities, see Scaling Activity (p. 7).

Request Parameters
Name
ActivityIds

Description List specifying the requested scaling activities using the ID number of each Scaling Activity. Type: ActivityIds (p. 86) Default: All scaling activities of the last six weeks Constraints: Must be scaling activities within last six weeks

Required No

AutoScalingGroupName

Name of the AutoScalingGroup. Type: String Default: none Constraints: AutoScalingGroup must exist within the scope of the caller's Amazon Web Services account

Yes

MaxRecords

The maximum number of scaling activities to return. Type: integer Default: 100 Constraints: Greater than ten, less than a hundred.

No

NextToken

String that used to mark the start of the next batch of returned results for pagination.

No

Response Elements
Name Activities Description List of the requested scaling activities. Type: Activities (p. 84) Availability: Always returned
API Version 2009-05-15 70

Amazon Auto Scaling Developer Guide DescribeScalingActivities

Name NextToken

Description Acts as a paging mechanism for large result sets. Set to a non-empty string if there are additional results waiting to be returned. Pass this in to subsequent calls to return additional results.

Special Errors
For a list of common errors for all calls, see API Error Codes (p. 40). Error Description HTTP Status Code 404 Not Found SOAP Prefix

ValidationError

A request parameter was invalid. For example, the specified AutoScalingGroup was not found or one or more of the specified Scaling Activity IDs were not found.

Client

Examples
Sample Request
Example Request (Query)

http://autoscaling.amazonaws.com/ ?AutoScalingGroupName=webtier &Action=DescribeScalingActivities &AWSAccessKeyId=XXX YOUR ACCESS KEY XXX &SignatureVersion=2 &SignatureMethod=HmacSHA1 &Timestamp=2009-01-13T00%3A41%3A38.000Z &Signature=XXX YOUR SIGNATURE XXX%3D

Sample Response

API Version 2009-05-15 71

Amazon Auto Scaling Developer Guide DescribeScalingActivities

Example Query Response

<DescribeScalingActivitiesResponse xmlns="http://autoscaling.amazonaws.com/ doc/2009-05-15/"> <DescribeScalingActivitiesResult> <Activities> <member> <ActivityId>885b2900-0f2e-497a-8ec6-b1b90a9ddee0</ActivityId> <StartTime>2009-03-29T04:07:07Z/StartTime> <Progress>0</Progress> <StatusCode>InProgress</StatusCode> <Cause>Automated Capacity Adjustment</Cause> <Description>Launching a new EC2 instance</Description> </member> </Activities> </DescribeScalingActivitiesResult> <ResponseMetadata> <RequestId>f0321780-e10a-11dd-a73e-2d774d6aee71</RequestId> </ResponseMetadata> </DescribeScalingActivitiesResponse>

Related Operations
DescribeAutoScalingGroups (p. 65) DescribeLaunchConfigurations (p. 67) DescribeTrigger (p. 73)

API Version 2009-05-15 72

Amazon Auto Scaling Developer Guide DescribeTriggers

DescribeTriggers
Description
Returns a full description of the trigger AutoScalingGroup.

Request Parameters
Name
AutoScalingGroupName

Description Name of the AutoScalingGroup. Type: String Default: None Constraints: The AutoScalingGroup provided must exist within the scope of the caller's Amazon Web Services account

Required Yes

Response Elements
Name Triggers Description List of structures containing the information details for triggers. There is currently a maximum of 1 trigger per AutoScalingGroup Type: Triggers (p. 104) Availability: Always returned. If no trigger exists for the given AutoScalingGroup, an empty list is returned.

Special Errors
For a list of common errors for all calls, see API Error Codes (p. 40).

Examples
Sample Request

API Version 2009-05-15 73

Amazon Auto Scaling Developer Guide DescribeTriggers

Example Request (Query)

http://autoscaling.amazonaws.com/ ?AutoScalingGroupName=webtier &Action=DescribeTriggers &Version=2009-05-15 &AWSAccessKeyId=XXX YOUR ACCESS KEY XXX &SignatureVersion=2 &SignatureMethod=HmacSHA1 &Timestamp=2009-01-13T00%3A44%3A39.000Z &Signature=XXX YOUR SIGNATURE XXX%3D

Sample Response
Example Query Response
<DescribeTriggersResponse xmlns="http://autoscaling.amazonaws.com/ doc/2009-05-15/"> <DescribeTriggersResult> <Triggers> <member> <BreachDuration>300</BreachDuration> <UpperBreachScaleIncrement>1</UpperBreachScaleIncrement> <CreatedTime>2009-01-13T00:44:19Z</CreatedTime> <UpperThreshold>60.0</UpperThreshold> <Status>NoData</Status> <LowerThreshold>0.0</LowerThreshold> <Period>60</Period> <LowerBreachScaleIncrement>-1</LowerBreachScaleIncrement> <TriggerName>tenpct</TriggerName> <Statistic>Average</Statistic> <Unit>None</Unit> <Namespace>AWS/EC2</Namespace> <Dimensions> <member> <Name>AutoScalingGroupName</Name> <Value>webtier</Value> </member> </Dimensions> <AutoScalingGroupName>webtier</AutoScalingGroupName> <MeasureName>CPUUtilization</MeasureName> </member> </Triggers> </DescribeTriggersResult> <ResponseMetadata> <RequestId>5c33c82a-e10b-11dd-a73e-2d774d6aee71</RequestId> </ResponseMetadata> </DescribeTriggersResponse>

API Version 2009-05-15 74

Amazon Auto Scaling Developer Guide DescribeTriggers

Related Operations
DescribeAutoScalingGroups (p. 65) DescribeLaunchConfigurations (p. 67) DescribeScalingActivities (p. 70)

API Version 2009-05-15 75

Amazon Auto Scaling Developer Guide SetDesiredCapacity

SetDesiredCapacity
Description
Adjusts the desired size of the AutoScalingGroup by initiating scaling activities. When reducing the size of the group, it is not possible to define which EC2 instances will be terminated. This applies to any auto-scaling decisions that might result in the termination of instances.

Note
When a trigger fires, it is possible that it will override the desired capacity set for this group.

Request Parameters
Name
AutoScalingGroupName

Description Name of AutoScalingGroup. Type: String Default: none

Required Yes

DesiredCapacity

New capacity setting for the group. Type: integer Default: none Constraints: should be between AutoScalingGroup's minimum and maximum size settings -->

Yes

Response Elements
Only Request Id metadata is returned.

Special Errors
For a list of common errors for all calls, see API Error Codes (p. 40). Error Description HTTP Status Code 400 Bad Request SOAP Prefix

ValidationError

A request parameter was invalid. For example, the AutoScalingGroup specified was not found, or the desired capacity was a negative value.

Client

Examples
API Version 2009-05-15 76

Amazon Auto Scaling Developer Guide SetDesiredCapacity

Sample Request
Example Request (Query)

http://autoscaling.amazonaws.com/ ?AutoScalingGroupName=webtier &DesiredCapacity=1 &Action=SetDesiredCapacity &Version=2009-05-15 &AWSAccessKeyId=XXX YOUR ACCESS KEY XXX &SignatureVersion=2 &SignatureMethod=HmacSHA1 &Timestamp=2009-01-13T00%3A40%3A51.000Z &Signature=XXX YOUR SIGNATURE XXX%3D

Sample Response
Example Query Response
<SetDesiredCapacityResponse xmlns="http://autoscaling.amazonaws.com/ doc/2009-05-15/"> <ResponseMetadata> <RequestId>d3f2091c-e10a-11dd-a73e- 2d774d6aee71</RequestId> </ResponseMetadata> </SetDesiredCapacityResponse>

Related Operations
DescribeAutoScalingGroups (p. 65)

API Version 2009-05-15 77

Amazon Auto Scaling Developer Guide TerminateInstanceInAutoScalingGroup

TerminateInstanceInAutoScalingGroup
Description
Terminates the specified instance. Optionally, the desired group size can be adjusted. If set to true, the default, the AutoScalingGroup size decreases by one. If the AutoScalingGroup is associated with a LoadBalancer, the system deregisters the instance before terminating it. This call simply registers a termination request. The termination of the instance can not happen immediately.

Request Parameters
Name
InstanceId

Description ID of the EC2 instance to be terminated. Type: String Default: None Constraints: Must be an EC2 instance that is a member of an AutoScalingGroup

Required Yes

ShouldDecrementDesiredCapacity

Specifies whether terminating this instance should also decrement the size of the AutoScalingGroup. The default is true. Type: Boolean Default: True Valid Values: True | False

No

Response Elements
Name Activity Description The activity to terminate the instance. Type: Activity (p. 85) Availability: Always returned

Special Errors
For a list of common errors for all calls, see API Error Codes (p. 40). Error Description HTTP Status Code 400 Bad Request SOAP Prefix

ValidationError

The instance ID specified was not found.


API Version 2009-05-15 78

Client

Amazon Auto Scaling Developer Guide TerminateInstanceInAutoScalingGroup

Examples
Sample Request
Example Request (Query)

http://autoscaling.amazonaws.com/ ?InstanceId=i-8fa224e6 &ShouldDecrementDesiredCapacity=true &Action=TerminateInstanceInAutoScalingGroup &Version=2009-05-15 &AWSAccessKeyId=XXX YOUR ACCESS KEY XXX &SignatureVersion=2 &SignatureMethod=HmacSHA1 &Timestamp=2009-01-13T00%3A45%3A57.000Z &Signature=XXX YOUR SIGNATURE XXX%3D

Sample Response
Example Query Response
<TerminateInstanceInAutoScalingGroupResponse xmlns="http:// autoscaling.amazonaws.com/doc/2009-05-15/"> <TerminateInstanceInAutoScalingGroupResult> <Activity> <ActivityId>e9c7e4c0-6915-45b3-90d8-6806ebd83106</ActivityId> <StartTime>2009-01-13T00:35:31Z</StartTime> <Progress>0</Progress> <StatusCode>InProgress</StatusCode> <Cause>TerminateInstanceInAutoScalingGroup</Cause> <Description>Terminating EC2 instance i-8fa224e6</Description> <EndTime/> </Activity> </TerminateInstanceInAutoScalingGroupResult> <ResponseMetadata> <RequestId>8aaa7663-e10b-11dd-a73e-2d774d6aee71</RequestId> </ResponseMetadata> </TerminateInstanceInAutoScalingGroupResponse>

Related Operations
SetDesiredCapacity (p. 76)

API Version 2009-05-15 79

Amazon Auto Scaling Developer Guide UpdateAutoScalingGroup

UpdateAutoScalingGroup
Description
Updates the configuration for the specified AutoScalingGroup. If the new values are specified for the MaxSize or MinSize parameters, then there will be an implicit call to SetDesiredCapacity (p. 76) to set the group to the new MaxSize. All optional parameters are left unchanged if not passed in the request. The new settings are registered upon the completion of this call. Any launch configuration settings take effect on any triggers after this call returns. Triggers that are currently in progress aren't affected. For more information on triggers, see Trigger (p. 7).

Request Parameters
Name
AutoScalingGroupName

Description Name of the AutoScalingGroup. Type: String Default: None

Required Yes

AvailabilityZones

Availability Zones for the group. Type: AvailabilityZones (p. 90) Default: None Constraints: must contain a list of one or more valid Availability Zones

No

Note
For information on passing parameter lists, see Parameter Lists (p. 37).
CoolDown

The amount of time after a Scaling Activity (p. 7) completes before any further trigger-related scaling activities can start. Time is in seconds. Type: Integer Default: Current value

No

LaunchConfigurationName

New launch configuration to use with AutoScalingGroup. Type: String Default: Current launch configuration

No

API Version 2009-05-15 80

Amazon Auto Scaling Developer Guide UpdateAutoScalingGroup

Name
MinSize

Description New setting for minimum size of the AutoScalingGroup. Type: Integer Default: Current value Constraints: Must be a positive integer no greater than MaxSize

Required No

MaxSize

New setting for maximum size of the AutoScalingGroup. Type: Integer Default: Current value Constraints: Must be a positive integer greater than MinSize and less than 10000

No

Note
No error is thrown if you set MaxSize to greater than your EC2 instance limit. However, the maximum AutoScalingGroup size will be limited by the smaller of this value and your EC2 maximum.

Response Elements
Only Request ID metadata is returned.

Special Errors
For a list of common errors for all calls, see API Error Codes (p. 40). Error Description HTTP Status Code 400 Bad Request SOAP Prefix

ValidationError

A request parameter was invalid. For example, the specified AutoScalingGroup or launch configuration was not found, or the MinSize or MaxSize was negative.

Client

Examples
Sample Request
API Version 2009-05-15 81

Amazon Auto Scaling Developer Guide UpdateAutoScalingGroup

Example Request (Query)

http://autoscaling.amazonaws.com/ ?AutoScalingGroupName=webtier &MaxSize=1 &Action=UpdateAutoScalingGroup &Version=2009-05-15 &AWSAccessKeyId=XXX YOUR ACCESS KEY XXX &SignatureVersion=2 &SignatureMethod=HmacSHA1 &Timestamp=2009-01-13T00%3A40%3A10.000Z &Signature=XXX YOUR SIGNATURE XXX%3D

Sample Response
Example Query Response
<UpdateAutoScalingGroupResponse xmlns="http://autoscaling.amazonaws.com/ doc/2009-05-15/"> <ResponseMetadata> <RequestId>bb8ebfce-e10a-11dd-a73e-2d774d6aee71</RequestId> </ResponseMetadata> </UpdateAutoScalingGroupResponse>

Related Operations
SetDesiredCapacity (p. 76) CreateAutoScalingGroup (p. 45) DescribeAutoScalingGroups (p. 65)

API Version 2009-05-15 82

Amazon Auto Scaling Developer Guide Data Types

Data Types
Topics Activities (p. 84) Activity (p. 85) ActivityIDs (p. 86) AutoScalingGroup (p. 87) AutoScalingGroupNames (p. 88) AutoScalingGroups (p. 89) AvailabilityZones (p. 90) BlockDeviceMapping (p. 91) BlockDeviceMappings (p. 92) Dimension (p. 93) Dimensions (p. 94) Instance (p. 95) Instances (p. 96) LaunchConfiguration (p. 97) LaunchConfigurationNames (p. 98) LaunchConfigurations (p. 99) LoadBalancerNames (p. 100) SecurityGroups (p. 101) Trigger (p. 102) Triggers (p. 104) The Auto Scaling API contains several data types that are used by both the Query and SOAP APIs. This section describes each data type in detail.

API Version 2009-05-15 83

Amazon Auto Scaling Developer Guide Activities

Activities
The Activities data type.

Relevant Operations
DescribeScalingActivities (p. 70)

Contents
The following table describes the elements contained in Activities. Name
member

Description A Scaling Activity. Type: Activity (p. 85)

API Version 2009-05-15 84

Amazon Auto Scaling Developer Guide Activity

Activity
The Activity data type.

Relevant Operations
DescribeScalingActivities (p. 70)

Contents
The following table describes the elements contained in Activity. Name
ActivityId

Description Activity ID. Type: String The reason (cause) the activity was begun. Type: String Friendly, more verbose description of the Scaling Activity. Type: String End time of the activity, if the activity has finished. If the activity is not yet finished and is still in progress, this EndTime isn't be returned. Type: DateTime Start time of this activity. Type: DateTime A value between 0 and 100 indicating the progress of this activity. Type: Integer Current status of the activity. Type: String Valid values: InProgress | Successful | Failed Friendly, more verbose description of the status. Type: String

Cause

Description

EndTime

StartTime

Progress

StatusCode

StatusMessage

API Version 2009-05-15 85

Amazon Auto Scaling Developer Guide ActivityIDs

ActivityIDs
The ActivityIDs data type.

Relevant Operations
DescribeScalingActivities (p. 70)

Contents
The following table describes the elements contained in ActivityIDs. Name
member

Description An Activity ID. Type: String

API Version 2009-05-15 86

Amazon Auto Scaling Developer Guide AutoScalingGroup

AutoScalingGroup
The AutoScalingGroup data type.

Relevant Operations
DescribeAutoScalingGroups (p. 65)

Contents
The following table describes the elements contained in AutoScalingGroup. Name
AvailabilityZones

Description Availability Zones for the group. Type: AvailabilityZones (p. 90) Constraints: Restricted to one availability zone. Name of the AutoScalingGroup. Type: String The date and time that this AutoScalingGroup was created. Type: DateTime The number of seconds after a ScalingActivity completes before any further scaling activities can start. Type: Integer Default: 0 desired capacity for the AutoScalingGroup Type: Integer Summary list of EC2 instances. (optional) Type: Instances (p. 96) Name of the associated LaunchConfiguration. Type: String Minimum size of the AutoScalingGroup. Type: Integer Maximum size of the AutoScalingGroup. Type: Integer

AutoScalingGroupName

CreatedTime

CoolDown

DesiredCapacity

Instances

LaunchConfigurationName

MinSize

MaxSize

API Version 2009-05-15 87

Amazon Auto Scaling Developer Guide AutoScalingGroupNames

AutoScalingGroupNames
The AutoScalingGroupNames data type. This type is unbounded.

Relevant Operations
DescribeAutoScalingGroups (p. 65)

Contents
The following table describes the elements contained in AutoScalingGroupNames. Name
member

Description Name of the AutoScalingGroup. Type: String

API Version 2009-05-15 88

Amazon Auto Scaling Developer Guide AutoScalingGroups

AutoScalingGroups
The AutoScalingGroup data type. This type is unbounded.

Relevant Operations
DescribeAutoScalingGroups (p. 65)

Contents
The following table describes the elements contained in AutoScalingGroups. Name
member

Description An AutoScalingGroup. Type: AutoScalingGroup (p. 87)

API Version 2009-05-15 89

Amazon Auto Scaling Developer Guide AvailabilityZones

AvailabilityZones
The AvailabilityZones data type. The type is unbounded.

Relevant Operations
CreateAutoScalingGroup (p. 45) DescribeAutoScalingGroups (p. 65)

Contents
The following table describes the elements contained in AvailabilityZones. Name
member

Description An Availability Zone. Type: String

API Version 2009-05-15 90

Amazon Auto Scaling Developer Guide BlockDeviceMapping

BlockDeviceMapping
The BlockDeviceMapping data type.

Relevant Operations
CreateLaunchConfiguration (p. 49) DescribeLaunchConfigurations (p. 67)

Contents
The following table describes the elements contained in BlockDeviceMapping. Name
DeviceName

Description Name of the device within Amazon EC2. Type: String Virtual name associated with the device. Type: String

VirtualName

API Version 2009-05-15 91

Amazon Auto Scaling Developer Guide BlockDeviceMappings

BlockDeviceMappings
The BlockDeviceMappings data type. This type is unbounded.

Relevant Operations
CreateLaunchConfiguration (p. 49) DescribeLaunchConfigurations (p. 67)

Contents
The following table describes the elements contained in BlockDeviceMappings. Name
member

Description An EC2 block device mapping item that specifies how block devices are exposed to the instance. Type: BlockDeviceMapping (p. 91)

API Version 2009-05-15 92

Amazon Auto Scaling Developer Guide Dimension

Dimension
The Dimension data type.

Relevant Operations
CreateOrUpdateScalingTrigger (p. 53)

Contents
The following table describes the elements contained in Dimension. Name
Name

Description Name of Dimension. Type: String Dimension value. Type: String

Value

API Version 2009-05-15 93

Amazon Auto Scaling Developer Guide Dimensions

Dimensions
The Dimensions data type.

Relevant Operations
CreateOrUpdateScalingTrigger (p. 53) DescribeTrigger (p. 73)

Contents
The following table describes the elements contained in Dimensions. Name
member

Description A dimension. Type: Dimension (p. 93)

API Version 2009-05-15 94

Amazon Auto Scaling Developer Guide Instance

Instance
The Instance data type.

Relevant Operations
DescribeAutoScalingGroups (p. 65)

Contents
The following table describes the elements contained in Instance. Name
InstanceId

Description EC2 instance ID. Type: String Description of current lifecycle state. Type: String

LifecycleState

API Version 2009-05-15 95

Amazon Auto Scaling Developer Guide Instances

Instances
The Instances data type. This type is unbounded.

Relevant Operations
DescribeAutoScalingGroups (p. 65)

Contents
The following table describes the elements contained in Instances. Name
member

Description A list of Instance elements. Type: Instance (p. 95)

API Version 2009-05-15 96

Amazon Auto Scaling Developer Guide LaunchConfiguration

LaunchConfiguration
The LaunchConfiguration data type.

Relevant Operations
DescribeLaunchConfigurations (p. 67)

Contents
The following table describes the elements contained in LaunchConfiguration. Name
LoadBalancerNames

Description List of LoadBalancer names. Type: LoadBalancerNames (p. 100) Specifies how block devices are exposed to the instance. Each mapping is made up of a virtualName and a deviceName. Type: BlockDeviceMappings (p. 92) The creation date and time for this launch configuration. Type: DateTime Unique ID of the Amazon Machine Image (AMI) that was assigned during registration. Type: String This species the instance type of the EC2 instance. Type: String ID of the kernel associated with the EC2 AMI. Type: String The name of the EC2 key pair. Type: String Name of the Launch Configuration (p. 7). Type: String ID of the RAM disk associated with the EC2 AMI. Type: String Description of the security groups to associate with the EC2 instances. Type: SecurityGroups (p. 101) The user data available to the launched EC2 instances. Type: String

BlockDeviceMappings

CreatedTime

ImageId

InstanceType

KernelId

KeyName

LaunchConfigurationName

RamdiskId

SecurityGroups

UserData

API Version 2009-05-15 97

Amazon Auto Scaling Developer Guide LaunchConfigurationNames

LaunchConfigurationNames
The LaunchConfigurationNames data type. This type is unbounded.

Relevant Operations
DescribeLaunchConfigurations (p. 67)

Contents
The following table describes the elements contained in LaunchConfigurationNames. Name
member

Description A launch configuration name. Type: String

API Version 2009-05-15 98

Amazon Auto Scaling Developer Guide LaunchConfigurations

LaunchConfigurations
The LaunchConfigurations data type. This type is unbounded.

Relevant Operations
DescribeLaunchConfigurations (p. 67)

Contents
The following table describes the elements contained in LaunchConfigurations. Name
member

Description Launch configuration details. Type: LaunchConfiguration (p. 97)

API Version 2009-05-15 99

Amazon Auto Scaling Developer Guide LoadBalancerNames

LoadBalancerNames
The LoadBalancerNames data type. The type is unbounded.

Relevant Operations
CreateLaunchConfiguration (p. 49) DescribeLaunchConfigurations (p. 67)

Contents
The following table describes the elements contained in LoadBalancerNames. Name
member

Description A LoadBalancer name. Type: String

API Version 2009-05-15 100

Amazon Auto Scaling Developer Guide SecurityGroups

SecurityGroups
The SecurityGroups data type. This type is unbounded.

Relevant Operations
CreateLaunchConfiguration (p. 49) DescribeLaunchConfigurations (p. 67)

Contents
The following table describes the elements contained in SecurityGroups. Name
member

Description Name of an EC2 security group. For more information about Amazon EC2 security groups, go to the Amazon EC2 product documentation. Type: string

API Version 2009-05-15 101

Amazon Auto Scaling Developer Guide Trigger

Trigger
The Trigger data type.

Relevant Operations
DescribeTrigger (p. 73)

Contents
The following table describes the elements contained in Trigger. Name
BreachDuration

Description The amount of time to wait while the trigger is firing before performing scaling activities in response to the breach. Type: Integer Name of AutoScalingGroup (p. 6). Type: String The creation date and time for the selected trigger. Type: DateTime The dimensions used to retrieve metric statistics that the trigger uses to determine when to fire. Type: Dimensions (p. 94) The lower limit for the metric. The trigger fires if all data points in the last BreachDuration seconds exceed the upper threshold or fall below the lower threshold. Type: Double The incremental amount to use when performing scaling activities when the lower threshold has been breached. Type: String Constraints: Must be a negative or positive integer or integer percentage value. The measure name used by the trigger to determine when to fire. Type: String The period used in retrieving metric statistics used by the trigger to determine when to fire. Type: Integer> The statistic used by the trigger to determine which metric statistics to examine. Type: String Current status of the trigger. Type: String Valid values: Can be NoData | LowBreaching | NotBreaching | HighBreaching
API Version 2009-05-15 102

AutoScalingGroupName

CreatedTime

Dimensions

LowerThreshold

LowerBreachScaleIncrement

MeasureName

Period

Statistic

Status

Amazon Auto Scaling Developer Guide Trigger

Name
TriggerName

Description Name of trigger. Type: String The standard unit associated with a measure, used by the trigger when fetching the metric statistics it uses to determine when to activate. Type: ??? The upper limit of the metric used. The trigger fires if all data points in the last BreachDuration seconds exceed the upper threshold or fall below the lower threshold. Type: double The incremental amount to use when performing scaling activities when the upper threshold has been breached. Type: string Constraints: Must be a negative or positive integer or percentage value.

Unit

UpperThreshold

UpperBreachScaleIncrement

API Version 2009-05-15 103

Amazon Auto Scaling Developer Guide Triggers

Triggers
Contains a collection of Triggers. This type is unbounded.

Relevant Operations
DescribeTrigger (p. 73)

Contents
The following table describes the elements contained in Triggers. Name
member

Description A collection of triggers. Type: Trigger (p. 102)

API Version 2009-05-15 104

Amazon Auto Scaling Developer Guide

Glossary

Access Key ID Amazon Elastic Compute Cloud Amazon Machine Image

An alphanumeric token that uniquely identifies a request sender. This ID is associated with your Secret Access Key. The Amazon Elastic Compute Cloud (Amazon EC2) is a web service that enables you to launch and manage server instances in Amazon's data centers using APIs or available tools and utilities. An Amazon Machine Image (AMI) is an encrypted machine image stored in Amazon Simple Storage Service (Amazon S3). It contains all the information necessary to boot instances of your software. Amazon Simple Queue Service (Amazon SQS) offers a reliable, highly scalable, hosted queue for storing messages as they travel between computers. Amazon EC2 locations are composed of Regions and Availability Zones. Availability Zones are distinct locations that are engineered to be insulated from failures in other Availability Zones and provide inexpensive, low latency network connectivity to other Availability Zones in the same Region. Amazon Auto Scaling term describing the condition in which a userset threshold (upper or lower boundary) is passed. If the duration of the breach is determined to be significant, set by a breach duration parameter, then the trigger fires and possibly performs an Scaling Activity. Auto Scaling key term. A process that changes the size, configuration, or makeup of an AutoScalingGroup. For more information, see Scaling Activity (p. 7). Auto Scaling key term. A representation of an application running on multiple Amazon Elastic Compute Cloud (EC2) instances. For more information, see AutoScalingGroup (p. 6). Amazon Auto Scaling term. A period of time after a trigger is fired where no trigger activity can take place, in order to prevent the trigger from continuously being reactivated. This period is
API Version 2009-05-15 105

Amazon Simple Queue Service Availability Zone

breach

Scaling Activity

AutoScalingGroup

cooldown

Amazon Auto Scaling Developer Guide

configurable, and gives the system time to perform and adjust to any new scaling activities (such as scale-in and scale-out) that affect capacity size. dimension Amazon CloudWatch key term. A dimension specifies how a measure should be aggregated, such as by Amazon Machine Image, Availability Zone or AutoScalingGroup. For more information, go to the Amazon CloudWatch Developer Guide. A system running in the cloud. EC2 instances are launched from an Amazon Machine Image (AMI). Auto Scaling key term. The parameters used to create new EC2 instances. For more information, see Launch Configuration (p. 7). Amazon Auto Scaling term that refers to the lifecycle state of the EC2 instances contained in an AutoScalingGroup. EC2 instances progress through several states over their lifespan; these include Pending, InService, Terminating and Terminated. Elastic Load Balancing key term. An LoadBalancer is represented by a DNS name and provides the single destination to which all requests intended for your application should be directed. For more information, go to the Amazon Elastic Load Balancing Developer Guide. Amazon CloudWatch term. A measure is an observed value with a name, a set of dimensions, a unit and an optional timestamp. For more information, go to the Amazon CloudWatch Developer Guide. Amazon CloudWatch key term. A metric is an aggregation of values from selected measures stored in one minute time slots. For more information, go to the Amazon CloudWatch Developer Guide. Amazon EC2 locations are composed of Regions and Availability Zones. Regions are geographically dispersed and are in separate geographic areas or countries. Regions consist of one or more Availability Zones. Amazon Web Services (AWS) key used for request authentication. Amazon CloudWatch key term. A statistic is a time-series of values for a metric. For more information, go to the Amazon CloudWatch Developer Guide. Auto Scaling key term. The mechanism used to initiate auto scaling activities. For more information, see Trigger (p. 7). Term used in Web Service Definition Language (WSDL), i.e. maxOccurs="unbounded", meaning that the number of potential occurences is not limited by a set number. Often used when defining a data type that is a list of other types, such as an unbounded list of integers (element members) or an unbounded list of other complex types that are element/members of the list being defined. Amazon CloudWatch key term. Every measure that is received by the CloudWatch Service has a unit attached, such as seconds or bytes. For more information, go to the Amazon CloudWatch Developer Guide.
API Version 2009-05-15 106

EC2 instance launch configuration lifecycle

LoadBalancer

measure

metric

Region

Secret Access Key statistic

trigger unbounded

unit

Amazon Auto Scaling Developer Guide Typographical Conventions

Document Conventions
This section lists the common typographical and symbol use conventions for AWS technical publications.

Typographical Conventions
This section describes common typographical use conventions. Convention Call-outs Description/Example A call-out is a number in the body text to give you a visual reference. The reference point is for further discussion elsewhere. You can use this resource regularly. Code in text Inline code samples (including XML) and commands are identified with a special font. You can use the command java -version. Blocks of sample code are set apart from the body and marked accordingly.
# ls -l /var/www/html/index.html -rw-rw-r-- 1 root root 1872 Jun 21 09:33 /var/www/html/ index.html # date Wed Jun 21 09:33:42 EDT 2006

Code blocks

Emphasis

Unusual or important words and phrases are marked with a special font. You must sign up for an account before you can use the service. References to a section in the same document are marked. A special font is used for expressions that are important to identify, but are not code. If the value is null, the returned response will be false.
API Version 2009-05-15 107

Internal cross references Logical values, constants, and regular expressions, abstracta

Amazon Auto Scaling Developer Guide Typographical Conventions

Convention Product and feature names Operations

Description/Example Named AWS products and features are identified on first use. Create an Amazon Machine Image (AMI). In-text references to operations. Use the GetHITResponse operation. In-text references to parameters. The operation accepts the parameter AccountID. In-text references to responses. A container for one CollectionParent and one or more CollectionItems. References to other AWS publications. If the reference is hyperlinked, it is also underscored. For detailed conceptual information, see the Amazon Mechanical Turk Developer Guide. A special font marks text that the user types. At the password prompt, type MyPassword. Denotes named items on the UI for easy identification. On the File menu, click Properties. When you see this style, you must change the value of the content when you copy the text of a sample to a command line. % ec2-register <your-s3-bucket>/image.manifest See also the following symbol convention.

Parameters

Response elements

Technical publication references

User entered values

User interface controls and labels Variables

API Version 2009-05-15 108

Amazon Auto Scaling Developer Guide Symbol Conventions

Symbol Conventions
This section describes the common use of symbols. Convention Mutually exclusive parameters Optional parameters XML variable text Symbol (Parentheses | and | vertical | bars) Description/Example Within a code description, bar separators denote options from which one must be chosen.
% data = hdfread (start | stride | edge)

[square brackets]

Within a code description, square brackets denote completely optional commands or parameters.
% sed [-n, -quiet]

Use square brackets in XML examples to differentiate them from tags.


<CustomerId>[ID]</CustomerId>

Variables

<arrow brackets>

Within a code sample, arrow brackets denote a variable that must be replaced with a valid value.
% ec2-register <your-s3-bucket>/image.manifest

API Version 2009-05-15 109

Amazon Auto Scaling Developer Guide

Index
A
Activities, 84 Activity, 85 ActivityIDs, 86 API common query parameters, 38 conventions, 37 data types, 37 Query, 14 SOAP, 17 User Scenarios, 21, 22, 25, 27, 30 APIs CreateAutoScalingGroup, 45 CreateLaunchConfiguration, 49 CreateOrUpdateScalingTrigger, 53 DeleteAutoScalingGroup, 58 DeleteLaunchConfiguration, 61 DeleteTrigger, 63 DescribeAutoScalingGroups, 65 DescribeLaunchConfigurations, 67 DescribeScalingActivities, 70 DescribeTriggers, 73 SetDesiredCapacity, 76 TerminateInstanceInAutoScalingGroup, 78 UpdateAutoScalingGroup, 80 authentication Query, 14 signature version 2, 14 SOAP, 17 Auto Scaling Behavior, 13 (see also Trigger) conceptual overview, 8 introductory overview, 5 major features, 5 Using Triggers, 11 (see also Trigger) Auto Scaling Availability Zones and Regions conceptual overview, 7 AutoScalingGroup, 87 AutoScalingGroupNames, 88 AutoScalingGroups, 89 AvailabilityZones, 90

conventions API, 37 CreateAutoScalingGroup, 45 CreateLaunchConfiguration, 49 CreateOrUpdateScalingTrigger, 53

D
data types, 37 Activities, 84 Activity, 85 ActivityIDs, 86 AutoScalingGroup, 87 AutoScalingGroupNames, 88 AutoScalingGroups, 89 AvailabilityZones, 90 BlockDeviceMapping, 91 BlockDeviceMappings, 92 Dimension, 93 Dimensions, 94 Instance, 95 Instances, 96 LaunchConfiguration, 97 LaunchConfigurationNames, 98 LaunchConfigurations, 99 LoadBalancerNames, 100 RequestId, 14 SecurityGroups, 101 Trigger, 102 Triggers, 104 DeleteAutoScalingGroup, 58 DeleteLaunchConfiguration, 61 DeleteTrigger, 63 DescribeAutoScalingGroups, 65 DescribeLaunchConfigurations, 67 DescribeScalingActivities, 70 DescribeTriggers, 73 Dimension, 93 Dimensions, 94

E
error, 35 retrieving, 35 error codes, 40

G
glossary, 105

B
BlockDeviceMapping, 91 BlockDeviceMappings, 92

I
Instance, 95 Instances, 96

C
client error codes, 40 Conceptual Overviews Auto Scaling, 8 Auto Scaling Availability Zones and Regions, 7

L
LaunchConfiguration, 97 LaunchConfigurationNames, 98 LaunchConfigurations, 99 LoadBalancerNames, 100

API Version 2009-05-15 110

Amazon Auto Scaling Developer Guide

O
Overviews Auto Scaling , 5 What Is Auto Scaling?, 5

P
programming language support, 17

Q
Query API, 14 authentication, 14 parameters, 14 query common parameters, 38

R
RequestId, 14 response structure, 19 response structure, SOAP, 19 ResponseMetadata RequestId, 14

S
SecurityGroups, 101 server error codes, 40 SetDesiredCapacity, 76 signature version 2, 14 SOAP API, 17 authentication, 17 response structure, 19, 19 WSDL, 17

T
TerminateInstanceInAutoScalingGroup, 78 Trigger, 102 Triggers, 104 troubleshooting, 35

U
UpdateAutoScalingGroup, 80 User Scenarios API, 21 Expand Auto-Scaled, Load Balanced Application to an Additional Availability Zone, 25 How to Set Up an Auto-Scaled Load Balanced EC2 Application, 22 Merge Separate Single-Zone Auto Scaling Groups Into a Single Multi-Zone Auto Scaling Group , 27 Shut Down Auto-Scaled, Load Balanced Application, 30

W
WSDL, 17
API Version 2009-05-15 111

You might also like