ec2-terminate-instances

Description

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]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.

Syntax

ec2-terminate-instances instance_id [instance_id ...]

Options

NameDescriptionRequired

instance_id

The instance ID.

Type: String

Default: None

Example: i-43a4412a

Yes

Output

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.

Examples

Example Request

This example terminates the i-3ea74257 instance.

PROMPT> ec2-terminate-instances i-3ea74257
INSTANCE i-3ea74257 running shutting-down