| Did this page help you? Yes No Tell us about it... |
Shuts down one or more instances. This operation is idempotent; if you terminate an instance more than once, each call will succeed.
Terminated instances will remain visible after termination (approximately one hour).
![]() | Note |
|---|---|
By default, Amazon EC2 deletes all Amazon EBS volumes that were attached when the instance launched. Amazon EBS volumes attached after instance launch continue running. |
You can stop, start, and terminate EBS-backed instances. You can only terminate S3-backed instances. What happens to an instance differs if you stop it or terminate it. For example, when you stop an instance, the root device and any other devices attached to the instance persist. When you terminate an instance, the root device and any other devices attached during the instance launch are automatically deleted. For more information about the differences between stopping and terminating instances, go to the "Stop/Start" and "Instance Termination" in Basics of Amazon EBS-Backed AMIS and Instances in the Amazon EC2 User Guide.
| Name | Description | Required |
|---|---|---|
|
|
One or more instance IDs. Type: String Default: None |
Yes |
The elements in the following table are wrapped in a
TerminateInstancesResponse structure.
| Name | Description |
|---|---|
|
|
The ID of the request. Type: xsd:string |
|
|
List of instance state changes. Each change's information
is wrapped in an Type: InstanceStateChangeType |
This example terminates the i-3ea74257 instance.
https://ec2.amazonaws.com/?Action=TerminateInstances &InstanceId.1=i-3ea74257 &AUTHPARAMS
<TerminateInstancesResponse xmlns="http://ec2.amazonaws.com/doc/2011-12-15/">
<requestId>59dbff89-35bd-4eac-99ed-be587EXAMPLE</requestId>
<instancesSet>
<item>
<instanceId>i-3ea74257</instanceId>
<currentState>
<code>32</code>
<name>shutting-down</name>
</currentState>
<previousState>
<code>16</code>
<name>running</name>
</previousState>
</item>
</instancesSet>
</TerminateInstancesResponse>