Amazon EC2 Auto Scaling
API Reference (API Version 2011-01-01)

The AWS Documentation website is getting a new look!
Try it now and let us know what you think. Switch to the new look >>

You can return to the original look by selecting English in the language selector above.


Terminates the specified instance and optionally adjusts the desired group size.

This call simply makes a termination request. The instance is not terminated immediately.

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.


The ID of the instance.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 19.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: Yes


Indicates whether terminating the instance also decrements the size of the Auto Scaling group.

Type: Boolean

Required: Yes

Response Elements

The following element is returned by the service.


A scaling activity.

Type: Activity object


For information about the errors that are common to all actions, see Common Errors.


You already have a pending update to an Amazon EC2 Auto Scaling resource (for example, an Auto Scaling group, instance, or load balancer).

HTTP Status Code: 500


The operation can't be performed because there are scaling activities in progress.

HTTP Status Code: 400


Sample Request &InstanceId=i-12345678 &ShouldDecrementDesiredCapacity=true &Version=2011-01-01 &AUTHPARAMS

Sample Response

<TerminateInstanceInAutoScalingGroupResponse xmlns=""> <TerminateInstanceInAutoScalingGroupResult> <Activity> <ActivityId>12345678-1234-1234-1234-123456789012</ActivityId> <Description>Terminating EC2 instance: i-12345678</Description> <Progress>0</Progress> <Cause>At 2015-06-14T00:07:30Z instance i-12345678 was taken out of service in response to a user request, shrinking the capacity from 4 to 3.</Cause> <StartTime>2015-06-14T00:07:30.280Z</StartTime> <Details>{"Availability Zone":"us-east-1a","SubnetID":"subnet-12345678"}</Details> <StatusCode>InProgress</StatusCode> </Activity> </TerminateInstanceInAutoScalingGroupResult> <ResponseMetadata> <RequestId>7c6e177f-f082-11e1-ac58-3714bEXAMPLE</RequestId> </ResponseMetadata> </TerminateInstanceInAutoScalingGroupResponse>

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: