Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions,
see Getting Started with Amazon Web Services in China
(PDF).
Cancel a Spot Instance request
If you no longer want your Spot Instance request, you can cancel it. You can only cancel Spot Instance
requests that are open
, active
, or
disabled
.
-
Your Spot Instance request is open
when your request has not
yet been fulfilled and no instances have been launched.
-
Your Spot Instance request is
active
when your request has been fulfilled and Spot Instances have launched
as a result.
-
Your Spot Instance request is disabled
when you stop your Spot Instance.
If your Spot Instance request is active
and has an associated running Spot Instance, canceling
the request does not terminate the instance. For more information about terminating
a Spot Instance, see Terminate a Spot Instance.
- Console
-
To cancel a Spot Instance request
-
Open the Amazon EC2 console at
https://console.amazonaws.cn/ec2/.
-
In the navigation pane, choose Spot Requests.
-
Select the Spot Instance request.
-
Choose Actions, Cancel request.
-
(Optional) If you are finished with the associated Spot Instances, you can terminate them. In the
Cancel Spot request dialog box, select
Terminate instances, and then choose
Confirm.
- Amazon CLI
-
To cancel a Spot Instance request
Use the following cancel-spot-instance-requests command.
aws ec2 cancel-spot-instance-requests --spot-instance-request-ids sir-0e54a519c9EXAMPLE
- PowerShell
-
To cancel a Spot Instance request
Use the Stop-EC2SpotInstanceRequest
cmdlet.
Stop-EC2SpotInstanceRequest -SpotInstanceRequestId sir-0e54a519c9EXAMPLE