When I try to launch an Amazon Elastic Compute Cloud (Amazon EC2) Spot Instance, I receive the "There is no Spot capacity available that matches your request" error message.
Resolution
The no Spot capacity available error occurs when Amazon EC2 doesn't have enough Spot capacity to fulfill a Spot Instance or Spot Fleet request. Spot capacity is the amount of unused Amazon EC2 compute capacity that's available to you at a lower price than On-Demand Instances.
To troubleshoot this issue, don't change the request. Spot requests continue to automatically make launch requests, and Amazon EC2 fulfills the Spot request as soon as capacity is available. If you frequently receive the no Spot capacity available error, then take the following actions.
Be flexible about the instance type
Be flexible about the instance types that you request and the Availability Zones that you deploy when you set up your workload. For example, don't request an m5.large in us-east-1a. Instead, request an m4.large, c5.large, r5.large, or t3.xlarge in multiple Availability Zones. This type of request increases the likelihood that Amazon EC2 can find and allocate your required compute capacity.
You can create multiple instance types for your Amazon EC2 Auto Scaling group, or when you create a Spot Fleet.
Use the price capacity optimized allocation strategy
With a price capacity optimized allocation strategy, Amazon EC2 selects Spot Instance pools based on the lowest likelihood of interruption at the lowest price. This strategy has an interruption rate that's comparable to the capacity-optimized allocation strategy. Also, with this strategy, the total price of your Spot Instances is typically lower than the capacity-optimized strategy. You can use this strategy for Amazon EC2 Auto Scaling and for Amazon EC2 Fleet and Spot Fleet.
Use the capacity-optimized allocation strategy
The capacity-optimized allocation strategy analyzes real-time capacity data to launch your Spot Instances into pools with the most available capacity. This strategy reduces the likelihood of no Spot capacity available errors.
For a complete list of best practices when you use Spot Instances, see Spot Instance best practices.
Related information
Spot Instance interruptions
Get the status of a Spot Instance request