| Did this page help you? Yes No Tell us about it... |
Cancels one or more Spot Instance requests. Spot Instances are instances that Amazon EC2 starts on your behalf when the maximum price that you specify exceeds the current Spot Price. Amazon EC2 periodically sets the Spot Price based on available Spot Instance capacity and current Spot Instance requests. For more information about Spot Instances, go to Spot Instances in the Amazon Elastic Compute Cloud User Guide.
![]() | Important |
|---|---|
Canceling a Spot Instance request does not terminate running Spot Instances associated with the request. |
The short version of this command is ec2csir.
ec2-cancel-spot-instance-requests
request_id [request_id...]
| Name | Description | Required |
|---|---|---|
|
|
The Spot Instance request ID. Type: String Default: None Example: sir-8456a32b |
Yes |
| 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:
SPOTINSTANCEREQUEST identifier
Spot Instance request ID
State
Amazon EC2 command line tools display errors on stderr.
This example cancels a Spot Instance request.
PROMPT>ec2-cancel-spot-instance-requests sir-98c16c03 sir-c1920c03SPOTINSTANCEREQUEST sir-98c16c03 cancelled SPOTINSTANCEREQUEST sir-c1920c03 cancelled