| Did this page help you? Yes No Tell us about it... |
Stops an instance that uses an Amazon EBS volume as its root device. Each time you transition an instance from stopped to started, we charge a full instance hour, even if transitions happen multiple times within a single hour.
![]() | Important |
|---|---|
Although Spot Instances can use Amazon EBS-backed AMIs, they don't support Stop/Start. In other words, you can't stop and start Spot Instances launched from an AMI with an Amazon EBS root device. |
Instances that use Amazon EBS volumes as their root devices can be quickly stopped and started. When an instance is stopped, the compute resources are released and you are not billed for hourly instance usage. However, your root partition Amazon EBS volume remains, continues to persist your data, and you are charged for Amazon EBS volume usage. You can restart your instance at any time.
![]() | Note |
|---|---|
Before stopping an instance, make sure it is in a state from which it can be restarted. Stopping an instance does not preserve data stored in RAM. Performing this operation on an instance that uses an instance store as its root device returns an error. |
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.
The short version of this command is ec2stop.
ec2-stop-instances
instance_id [instance_id...] [--force]
| Name | Description | Required |
|---|---|---|
|
|
The ID of the instance you want to stop. Type: String Default: None Example: i-43a4412a |
Yes |
|
|
Forces the instance to stop. The instance will not have an opportunity to flush file system caches or file system metadata. If you use this option, you must perform file system check and repair procedures. This option is not recommended for Windows instances. Type: Boolean Default: None Example: None |
No |
| Option | Description |
|---|---|
|
|
Overrides the Region specified in the Default: The Example: |
|
|
Default: The Example: |
|
|
The private key to use when constructing requests to Amazon EC2. Default: The value of the Example: |
|
|
The X.509 certificate to use when constructing requests to Amazon EC2. Default: The value of the Example: |
|
|
Specifies a connection timeout (in seconds). Example: --connection-timeout 30 |
|
|
Specifies a request timeout (in seconds). Example: --request-timeout 45 |
|
|
Displays verbose output by showing the SOAP request and response on the command line. This is particularly useful if you are building tools to talk directly to our SOAP API. |
|
|
Displays column headers in the output. |
|
|
Shows empty columns as |
|
|
Do not display tags for tagged resources. |
|
|
Prints internal debugging information. This is useful to assist us when troubleshooting problems. |
|
|
Displays Help. |
|
|
If Example: |
The command returns a table that contains the following information:
INSTANCE identifier
Instance ID
Previous state
Current state
Amazon EC2 command line tools display errors on stderr.
This example stops the i-10a64379 instance.
PROMPT>ec2-stop-instances i-10a64379INSTANCE i-10a64379 running stopping