Search⌘ K
AI Features

Spot Instance Use Cases

Discover how to use AWS Spot Instances to optimize costs by running workloads on spare EC2 capacity. Learn about suitable use cases such as batch processing, big data analytics, machine learning training, and containerized microservices. Understand the interruption model, pricing, and best practices to build resilient, cost-efficient cloud architectures.

Spot instances allow us to use spare compute capacity in Amazon EC2 at significantly reduced prices. Instead of paying the full On-Demand rate, we can run workloads on unused infrastructure that AWS temporarily makes available. Because these instances rely on excess capacity, they are much cheaper but can be interrupted if AWS needs the resources back.

In practice, this means organizations can run large-scale workloads at up to 90% lower cost compared to On-Demand instances. This makes spot instances extremely attractive for large distributed systems, data processing pipelines, and machine learning workloads where thousands of compute nodes may be required.

AWS may reclaim the instance with a two-minute interruption notice, spot instances are best suited for workloads that can tolerate interruptions or can restart from a saved state.

What is a spot instance?

A Spot Instance is a type of Amazon EC2 instance that runs on unused AWS capacity. AWS offers these instances at discounted prices because they are not guaranteed to remain available indefinitely.

Instead of reserving infrastructure specifically for us, AWS allocates spot instances from pools of spare compute capacity that exist within its global data center infrastructure. These pools represent unused EC2 instances that are temporarily idle. When demand for that capacity increases, AWS may reclaim the instance and return the hardware to the main pool of available compute resources.

The key trade-off is therefore simple: Lower cost in exchange for possible interruptions.

Cost vs. reliability trade-off
Cost vs. reliability trade-off

How spot instances work

Spot instances are allocated from capacity pools. Each capacity pool represents unused EC2 instances of a particular type within a specific AZ.

When a user requests a Spot Instance, AWS searches these pools for available resources that match the requested instance type, region, and configuration.

The process works as follows:

  1. AWS checks available spare capacity that matches your request.

  2. If capacity exists, the instance launches immediately at the current spot price.

  3. The instance continues running as long as spare capacity remains available. ...