Posted On: Nov 11, 2022

Today, we are introducing a new price and capacity optimized allocation strategy for Amazon EC2 Spot Instances to help you optimize provisioning of Spot Instances via EC2 Auto Scaling, EC2 Fleet, and Spot Fleet. The price and capacity optimized allocation strategy makes Spot allocation decisions based on both spare capacity availability and Spot Instance price. The price and capacity optimized allocation strategy is the best choice for most Spot applications such as big data, containerized workloads, CI/CD, web servers, image and media rendering, machine learning, and high performance computing (HPC). 

A best practice for using EC2 Spot Instances is to be flexible across instance types and Availability Zones to increase the chance of getting your target aggregate capacity and decrease the chance of interruptions even if some of the specific Spot capacity pools are not available. EC2 Auto Scaling groups, EC2 Fleet, and Spot Fleet use Spot allocation strategies to select Spot Instance pools to fulfill your Spot request. 

Until now, the lowest price and capacity optimized Spot allocation strategies allowed you to optimize your Spot Instance placement for either the price of Spot Instance pools or the capacity availability, but not both. Now, the new price and capacity optimized allocation strategy looks at both price and capacity to select the Spot Instance pools that are the least likely to be interrupted and have the lowest possible price. The new strategy maintains an interruption rate comparable to the capacity optimized allocation strategy, while keeping the total price of your Spot Instances lower than capacity optimized would typically do. 

To get started, set “price and capacity optimized” as the Spot allocation strategy in your EC2 Auto Scaling, EC2 Fleet, or Spot Fleet configuration. For a simple way to create the most efficient instance type flexible configuration we recommend that you use attribute-based instance type selection. When provisioning the instances, your Auto Scaling group or Fleet will consider Spot instance pools that you selected for both price and availability to make an optimal allocation decision. Customers using Kubernetes with the open-source Karpenter cluster autoscaler can benefit from this new Spot allocation strategy by default starting in Karpenter v0.19.0.

The price and capacity optimized Spot allocation strategy is now available in all public AWS Regions and AWS GovCloud (US). For more information, see EC2 Auto Scaling documentation, EC2 Fleet documentation, and Spot Fleet documentation