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. |
ec2-terminate-instances
instance_id [instance_id
...]
| Name | Description | Required |
|---|---|---|
|
|
The instance ID. Type: String Default: None Example: i-43a4412a |
Yes |
The command returns a table that contains the following information:
INSTANCE identifier
The instance ID of the instance being terminated
The state of the instance prior to being terminated
The new state of the instance
Amazon EC2 displays errors on stderr.
This example terminates the i-3ea74257 instance.
PROMPT>ec2-terminate-instances i-3ea74257INSTANCE i-3ea74257 running shutting-down