Why am I receiving a "no Spot capacity available" error when trying to launch an Amazon EC2 Spot Instance?
"I get an error message when I try to launch an Amazon Elastic Compute Cloud (Amazon EC2) Spot Instance. The error reads, "There is no Spot capacity available that matches your request.""
"I get an error message when I try to launch an Amazon Elastic Compute Cloud (Amazon EC2) Spot Instance. The error reads, "There is no Spot capacity available that matches your request."ResolutionThe "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 spare, unused EC2 compute capacity that's available to customers at a lower price than On-Demand Instances.To troubleshoot this error, do one of the following:Keep the request as it is. The Spot request continues to automatically make the launch request until capacity becomes available. When capacity becomes available, Amazon EC2 fulfills the Spot request. If you encounter the "no Spot capacity available" error frequently, then consider using the next workaround.Be flexible about the instance types that you request and the Availability Zones that you deploy when setting up your workload. For example, instead of requesting an m5.large in us-east-1a, request an m4.large, c5.large, r5.large, or t3.xlarge in multiple Availability Zones. This type of request increases the chances of Amazon Web Services (AWS) finding and allocating your required amount of compute capacity.Use the price and capacity optimized allocation strategy (best practice). This allocation strategy looks at both price and capacity to select the Spot Instance pools. The Spot Instance pools that are selected are the least likely to be interrupted and have the lowest possible price. The price and capacity optimized strategy maintains 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. For more information, see Allocation strategies for Spot Instances.Use the capacity-optimized allocation strategy. This allocation strategy analyses real-time capacity data to launch your Spot Instances into pools with the most available capacity. The capacity-optimized allocation strategy reduces your chances of receiving "no Spot capacity available" errors.You might implement the preceding solutions when provisioning a Spot Instance through Amazon EC2 Auto Scaling, EC2 Fleet, and Spot Fleet. For a complete list of best practices when using Spot Instances, see Spot Instance best practices.Related informationSpot Instance interruptionsSpot request statusFollow"