- Newest
- Most votes
- Most comments
Could you confirm if it is now possible to configure an ASG to use only Spot Instances initially, but automatically switch to On-Demand if Spot capacity is unavailable after multiple attempts? If so, what would be the best way to implement this using native AWS features?
Hello,
Currently its not possible to failover to OnDemand when spot capacity isn't available. Spot instances are offered at a discount because they are EC2's spare capacity, and in exchange for offering the discount, EC2 is then able to reclaim the instances when needed.
To minimize the possibility of capacity errors when using 100% spot, we recommend using as many instance types as possible. This way if capacity for one type isn't available, the ASG can failover to another type which does have capacity in the AZ. Similarly, enabling multiple AZs allows the ASG to failover to another AZ if there's 0 capacity available for any of your listed instance types. A few tips for maximizing your available instance types:
- Use a list of attributes to match all possible instances that fit your workload
- Enable Rebalance Notifications on the ASG. This allows AutoScaling to try and proactively launch a replacement instance and gracefully terminate the instance which received the spot notification warning of its imminent termination
- Set the DesiredCapacityType to vCPUs or Memory to allow multiple sizes of instances from a single family without over or under scaling your group (this is similar to adding weights to instance types when defining an explicit list of overrides)
- Add Burstable instances (T family) to your list. These are excluded by default and often have different usage patterns than other instance families, helping balance availability. Add an attribute for
burstableand set it toinclude
Additionally, if you have a set minimum capacity on the ASG, you can consider using the On-Demand Base Capacity for those instances which will always be running, and purchasing a Savings Plan to lower the cost: https://aws.amazon.com/savingsplans/
Relevant content
- asked a year ago
- asked 4 years ago

Hello, no, it is not possibly natively. The recommendations in the above post still stand, and are good ways to use Spot with minimal interruptions for your spot tolerant applications
I also recommend you generally ask new questions and link to the old one vs asking a new question as an answer on an old one. I only saw a notification about your post because I had previously answered it, but most people won't see it and you might not get an answer.
Are there other 'non-native' ways to handle this?