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 conceptual information about Spot Instances, refer to the Amazon Elastic Compute Cloud Developer Guide or Amazon Elastic Compute Cloud User Guide.
![]() | Important |
|---|---|
Canceling a Spot Instance request does not terminiate running Spot Instances associated with the request. |
ec2-cancel-spot-instance-requests
request_id
[request_id...]
| Name | Description | Required |
|---|---|---|
|
|
Specifies the ID of the Spot Instance request. Type: String Default: None Example: sir-8456a32b |
Yes |
The command returns a table that contains the following information:
Request ID
Spot Instance requests
State
Amazon EC2 displays errors on stderr.
This example cancels a Spot Instance request.
PROMPT>ec2-cancel-spot-instance-requests sir-ed3a2006SPOTINSTANCEREQUEST sir-ed3a2006 cancelled