Spot Instances Guide
Save up to 90% on EC2 by using spare capacity. Learn how Spot works, how to handle interruptions, and which workloads are a perfect fit.
What are Spot Instances?
Spot Instances let you use unused EC2 capacity at up to 90% discount compared to On-Demand prices. The trade-off: AWS can reclaim them with a 2-minute notice when it needs the capacity back.
Up to 90%
savings vs On-Demand
2 min
interruption notice
Same HW
identical to On-Demand
How It Works
You request spare capacity
Spot Instances use unused EC2 capacity. You set a maximum price (or use the current spot price) and launch.
AWS allocates if available
If capacity is available and your max price ≥ current spot price, your instance runs at the current spot price (not your max).
Price fluctuates with demand
Spot price changes based on supply and demand. You always pay the current price, not your bid.
AWS can reclaim with 2-min notice
When AWS needs the capacity back, you get a 2-minute warning via instance metadata and CloudWatch Events.
📈 See real Spot price history
Our calculator shows 30/90-day Spot price charts for every instance type. Select any instance and check the Spot Price History section.
✅ Great Workloads for Spot
CI/CD & Testing
Build pipelines, integration tests, load testing. Interruption just means a retry.
Batch Processing
Data transformation, ETL jobs, video encoding. Checkpointable and restartable.
ML Training
Training jobs with checkpointing. Save model state periodically, resume on new instance.
Stateless Web Workers
Horizontally scaled workers behind a load balancer. Losing one node is seamless.
Big Data & Analytics
Spark, Hadoop, EMR clusters. Frameworks handle node loss natively.
Dev/Test Environments
Non-production environments where occasional downtime is acceptable.
❌ Avoid Spot For
Primary Databases
Databases need persistent, uninterrupted compute. Use On-Demand or Reserved.
Mission-Critical Services
Services that cannot tolerate any downtime or data loss.
Stateful Singletons
Single-instance apps with no failover or state recovery mechanism.
Handling Interruptions
Check the 2-minute warning
Poll instance metadata at http://169.254.169.254/latest/meta-data/spot/instance-action every 5 seconds. Or use CloudWatch Events / EventBridge for push notifications.
curl -s http://169.254.169.254/latest/meta-data/spot/instance-actionUse Spot Instance Drain
For ECS, enable Spot Instance Draining so tasks are gracefully moved before termination. For Kubernetes, use the AWS Node Termination Handler.
Checkpoint your work
Save progress to S3, EFS, or a database periodically. On restart, resume from the last checkpoint instead of starting over.
Diversify instance types
Use Spot Fleet or EC2 Auto Scaling with multiple instance types and AZs. More pools = less chance of simultaneous interruption.
Mix with On-Demand
Run a baseline on On-Demand/Reserved and scale out with Spot. Auto Scaling groups support mixed instance policies.
Best Practices
Use multiple instance types
Don't rely on a single type. Spread across 5-10 similar types to access more capacity pools.
Use multiple AZs
Each AZ has independent capacity. Spreading across AZs reduces interruption risk.
Don't set a max price
Let it default to On-Demand price. You'll pay the spot price anyway, and a cap just means more interruptions.
Use capacity-optimized allocation
The capacity-optimized strategy picks pools with the most available capacity, reducing interruption probability.
Check Spot prices now
Compare Spot vs On-Demand vs Reserved Instances vs Savings Plans for any instance type, with real-time price history charts.
Open Calculator