DEV Community

Cover image for AWS Spot Instances: Maximize Savings, Minimize Interruptions
Alon Shrestha
Alon Shrestha

Posted on • Originally published at cloudwithalon.com

AWS Spot Instances: Maximize Savings, Minimize Interruptions

Note: This post was originally published on my main blog site.

AWS claims that Spot Instances can save you up to 90% compared to On-Demand pricing.

But here’s the real question:

Do you always save 90% with Spot Instances?

Not quite. That 90% is the maximum possible discount and not a guaranteed discount.

In reality, most users save around 50% to 70%, and only a few manage to reach 80% or more. However, with a solid understanding of how Spot Instances work and the right strategies in place, you can get much closer to that 90% mark.

In this post, we’ll explore:

  • What Spot Instances are

  • How Spot pricing works and ways to maximize savings

  • Strategies to minimize interruptions

What are Spot Instances?

AWS has a large pool of servers for its customers. When demand is low, some of these servers remain unused. These spare servers are offered as AWS Spot Instances. Instead of leaving them idle, AWS makes them available at a much lower price, up to 90% cheaper than On-Demand.

There’s no difference in how they run. A Spot Instance is the same EC2 instance you’d get with On-Demand.

The only difference is:

If AWS needs that capacity back when demand rises, your Spot Instance gets interrupted and the capacity reassigned to customers paying the regular price.

Then what happens to your EC2 instance?

By default, AWS will terminate your Spot Instance during an interruption, which means any data stored on the instance will be lost. To control this behavior, you can configure the interruption action to either stop, hibernate, or terminate the instance based on your needs.

Learn more about Spot Instance interruption behavior.

Truth About “Up to 90%” Savings

AWS advertises Spot Instances as “up to 90% cheaper” but that doesn’t mean you will get 90% off on every Spot Instance you launch.

Spot Instance prices aren’t fixed. They change frequently based on region, instance type, and demand.

Before launching a spot instance, you can check its potential savings by viewing its price history in the AWS Console:

EC2 > Spot Requests > Pricing History

  • us-east-1a

Spot Instances Pricing

  • us-east-1d

Spot Instances Pricing

This shows how Spot prices have changed over the last 3 months, updating every minute. Each instance type and Availability Zone (AZ) may have different prices.

For example, us-east-1a vs us-east-1d:

  • c5d.18xlarge: ~57% vs ~64% savings

  • c6gd.2xlarge: ~83.6% vs ~85% savings

  • m8i.metal-96xlarge: ~89.99% vs ~89.98% savings

These differences are driven by supply and demand. You always pay the current market price for that capacity.

Also note: Spot pricing today is more predictable than in the past. Before 2017, AWS used a bidding system where prices spiked rapidly, but now Spot follows a smoother demand-based model.

To get more value out of Spot Instances, try these approaches:

  • Use newer instance generations
    Newer families often have more unused capacity, which translates into higher discounts and fewer interruptions.

  • Spread across multiple Availability Zones (AZs)

    The same instance type can have different Spot prices depending on the AZ. By running across multiple zones, you increase your chances of finding cheaper pools.

  • Setting maximum price
    While setting maximum price when launching a Spot Instance can help control costs. However, it’s no longer recommended, as it often increases the chance of interruptions.

  • Price capacity optimized allocation strategies
    You can choose the price capacity optimized strategy when running a fleet of Spot Instances. AWS automatically identifies instance pools with the highest availability (i.e., lowest chance of interruption) and, among those, selects the one with the lowest price.

Strategies to Minimize Interruptions

Spot Instances should only be used for applications that can tolerate faults. Even then, frequent interruptions can impact your business.

Since interruptions occur when AWS needs capacity back, here are strategies to reduce their impact:

AWS Spot Instance Advisor

The Spot Instance Advisor provides the frequency of interruptions for different instance types. A higher frequency indicates a higher chance that your instance will be interrupted, helping you choose instances with fewer disruptions.

Recommended to use instance type with <5% frequency of interruption.

Spot Instance Advisor

Capacity-Optimized Allocation Strategy

It's best to use Spot Instances with an Auto Scaling Group or EC2 Fleet. This helps manage interruptions more effectively and keeps your applications running smoothly.

To improve reliability even further, you can use the Capacity-Optimized Allocation Strategy.

This AWS feature selects Spot Instance pools that are less likely to be interrupted, giving you better stability.

Learn more about Capacity-Optimized Allocation Strategy.

Spot Instance interruption notices

AWS provides a 2-minute interruption notice before reclaiming capacity. You can capture this signal from instance metadata or EventBridge to gracefully stop workloads, checkpoint data, or shift traffic.

Learn more

With Spot Instances, cost savings and interruption risk are a tradeoff. It is not always easy to achieve both at the same time. The key is to use the right strategies: monitor pricing trends, choose low interruption pools, diversify across instance types and Availability Zones, and design workloads that can tolerate failures.

When applied correctly, Spot Instances can deliver near maximum savings while still keeping your applications reliable.

I hope this page has made you clear about AWS Spot Instances.

Thanks for reading.

- Alon

Top comments (0)