
Streamlining Infrastructure with Configuration Management Tools
July 16, 2025
The Hard Part of Leaving AWS: How to Move Your Databases and Object Storage to European Cloud
March 26, 2026AWS Spot Instances let you use spare Amazon EC2 computing capacity at prices significantly lower than On-Demand rates. This makes them an attractive option for reducing cloud computing costs, especially for workloads that can handle interruptions.
Spot Instances tap into unused EC2 capacity, with hourly pricing (called Spot price) set by Amazon EC2. This price adjusts gradually based on long-term supply and demand. Your instance runs as long as capacity is available, or until you terminate it.
These instances work best for tasks with flexible execution times — data analysis, batch processing jobs, background tasks, or optional computations. If your application can pause and resume without problems, Spot Instances could be ideal.
Key Concepts
Before using Spot Instances, understand these important concepts:
- Spot capacity pool: A collection of unused EC2 instances of the same type within a specific Availability Zone. Note that AWS independently maps Availability Zone codes (such as us-east-1a) to physical locations for each account, so the same code may refer to different infrastructure across accounts.
- Spot price: The current hourly cost for a Spot Instance, set by Amazon EC2 and adjusted gradually based on long-term supply and demand trends.
- Spot Instance request: How you request a Spot Instance. Requests can be one-time or persistent, with persistent requests automatically resubmitted if the instance is interrupted.
- Maximum price (optional): You can optionally set a maximum price you are willing to pay. If you do not specify one, it defaults to the On-Demand price. AWS recommends not setting a maximum price, as doing so does not increase your chances of launching an instance but may increase the frequency of interruptions.
- EC2 instance rebalance recommendation: A signal from AWS indicating higher interruption risk, giving you time to proactively move workloads before the standard two-minute warning.
- Spot Instance interruption: When Amazon EC2 reclaims capacity by terminating, stopping, or hibernating your instance with a two-minute warning. Interruptions can occur not only because EC2 needs the capacity back, but also for reasons such as host maintenance or hardware decommissioning.
How Spot Pricing Works
You pay the Spot price that is in effect when your instance is running, billed to the nearest second with a 60-second minimum. Prices are set by Amazon EC2 and adjust gradually based on long-term supply and demand trends. Typical savings range from 50% to 90% compared to On-Demand pricing, though the actual discount depends on the instance type, region, and current demand.
You can optionally specify a maximum price you are willing to pay, but AWS advises against it. A high maximum price does not improve your chances of launching or reduce the likelihood of interruption. If you do set one, your instance will be interrupted when the Spot price exceeds it — which means a lower maximum price leads to more frequent interruptions. If you do not specify a maximum price, it defaults to the On-Demand price.
Comparison with On-Demand Instances
Spot Instances differ from On-Demand Instances in several key ways:
- Launch time: Spot Instances launch only when capacity is available. On-Demand instances typically launch immediately upon request, though they can also fail if capacity is insufficient in the requested Availability Zone.
- Capacity availability: Persistent Spot requests keep trying until capacity becomes available. On-Demand requests return an error if capacity is not available at the time of the request.
- Pricing: Spot prices adjust gradually based on long-term supply and demand trends. On-Demand prices remain fixed.
- Control: AWS can interrupt Spot Instances when it needs capacity back, for host maintenance, or for hardware decommissioning (with a two-minute warning). You control when On-Demand instances stop.
Billing for Interrupted Instances
You pay the current Spot price for the time your instance is running, billed to the nearest second. When a Spot Instance is interrupted, the billing depends on the operating system and who initiated the interruption — you may be charged for the seconds used, for the full hour, or receive no charge for the partial period.
While an interrupted Spot Instance is in a stopped state, you are charged only for the associated EBS volumes, which are preserved.
Savings Plans and Spot Instances
AWS Savings Plans do not cover Spot Instances. If you have a Savings Plan, it does not provide additional savings on top of the Spot discount. Furthermore, your spending on Spot Instances does not count toward Savings Plan commitments.
Pricing Visibility
Current Spot prices are available on the Amazon EC2 Spot Instances Pricing page, updated every five minutes. For historical pricing (up to three months back), use the AWS Management Console or the describe-spot-price-history CLI command. You can also track your Spot Instance savings for specific fleets or across all usage to measure cost-effectiveness.
Best Practices
To get the most out of Spot Instances:
- Diversify instance types and Availability Zones. Running across multiple capacity pools reduces the impact of interruption in any single pool.
- Use the price-capacity-optimized allocation strategy when requesting Spot capacity through EC2 Fleet or Spot Fleet. This strategy selects pools with the highest capacity availability and lowest price.
- Do not set a maximum price unless you have a specific reason. The default (On-Demand price) maximizes availability.
- Design for fault tolerance. Use checkpointing, stateless architectures, and graceful shutdown handling to manage interruptions.
- Monitor the rebalance recommendation signal via instance metadata or EventBridge to proactively shift workloads before the two-minute interruption notice.
