FinOpsForge · Cloud cost guides, tools and comparisons. Sponsors are labelled.

AWS Spot Instances: Workload Fit and Interruption Planning (2026)

// Jan 2026 // 10 min read

Consider Spot capacity for workloads that can recover or retry when capacity is interrupted. Assess the application’s state, latency and recovery requirements before selecting a capacity mix. Use the provider’s current offers and your own workload measurements rather than assuming a discount outcome.

How Spot Instances Work

Spot Instances use spare EC2 capacity and can be interrupted. Review the provider’s current capacity and interruption terms, then test whether your workload can recover or retry. Compare eligible usage with your own available options instead of applying a generic discount range.

Do not assume an average interruption frequency for your workload. Assess the capacity pools and configurations you intend to use, test recovery and monitor interruption behavior in your own deployment.

Workloads That Work Well on Spot

// good for spot

  • CI/CD build pipelines
  • Batch data processing (Spark, EMR)
  • ML training jobs
  • Stateless web tier (behind load balancer)
  • Video transcoding
  • Game servers (with checkpoint support)
  • Selenium test grids

// not suitable

  • Primary databases
  • Single-instance critical services
  • Stateful workloads without checkpointing
  • Long-running jobs without restart logic
  • Anything requiring guaranteed uptime SLA

Handling Interruptions Gracefully

AWS issues a Spot Instance interruption notice before it stops or terminates a Spot Instance. The notice is emitted on a best-effort basis and AWS recommends checking for it every 5 seconds. It normally comes two minutes before the interruption, but when hibernation is the interruption behavior you receive a notice without a two-minute warning, because hibernation begins immediately. Treat the notice as a useful signal, not a guarantee, and design the workload to tolerate an interruption that arrives without warning. The pattern:

# Run this on the Spot Instance itself, not in a build or CI environment # 1. Request an IMDSv2 session token TOKEN=$(curl -s -X PUT "http://169.254.169.254/latest/api/token" -H "X-aws-ec2-metadata-token-ttl-seconds: 21600") # 2. Poll for an interruption notice (HTTP 404 = no stop or terminate action is scheduled) STATUS=$(curl -s -o /tmp/instance-action -w "%{http_code}" -H "X-aws-ec2-metadata-token: $TOKEN" http://169.254.169.254/latest/meta-data/spot/instance-action) # 3. HTTP 200: the body names the action and an approximate UTC time, # for example {"action": "terminate", "time": "2026-01-01T08:22:00Z"} if [ "$STATUS" = "200" ]; then # drain connections, checkpoint state, shut down gracefully : # Replace this no-op with your application-specific handler fi

A 404 response means no stop or terminate action is currently scheduled for the instance. Because notices are best-effort, it does not prove that the instance will not be interrupted. Run this check on the Spot Instance itself; do not call the metadata address from a build or CI environment. An Amazon EventBridge rule for the 'EC2 Spot Instance Interruption Warning' event is an alternative signal. The older termination-time item is kept by AWS for backward compatibility; use instance-action instead.

For batch jobs: checkpoint progress every 5–10 minutes. For stateless web: rely on your load balancer's connection draining. For Kubernetes: use node termination handler (AWS Node Termination Handler Helm chart).

Architecture Patterns

Pattern 1 — Diversified instance fleet: Never use a single instance type. Request 6–10 instance families simultaneously (m5, m5a, m5n, m4, m6i, r5, etc.). If one pool is interrupted, capacity remains in others.

Pattern 2 — Spot + On-Demand baseline: Keep the baseline capacity required for service objectives and use interruption-tolerant capacity only where the workload supports it. Test fallback behavior and capacity availability. Size the mix from observed demand and recovery requirements, then measure the effect on your own bill.

Mixed Instance Fleet with Auto Scaling

This is a CloudFormation properties fragment, not a complete stack. Place it under Properties of an AWS::AutoScaling::AutoScalingGroup. Replace the launch-template ID and version placeholders with an existing compatible template and a valid version number. Configure the group's subnets and capacity limits separately, and check that the template's AMI and launch settings work with every listed instance type before use.

# AWS::AutoScaling::AutoScalingGroup Properties fragment MixedInstancesPolicy: InstancesDistribution: OnDemandBaseCapacity: 2 # On-Demand baseline, up to desired capacity OnDemandPercentageAboveBaseCapacity: 20 # 20% on-demand above base SpotAllocationStrategy: "price-capacity-optimized" LaunchTemplate: LaunchTemplateSpecification: LaunchTemplateId: "lt-REPLACE_WITH_EXISTING_TEMPLATE" Version: "REPLACE_WITH_VERSION_NUMBER" Overrides: - InstanceType: m5.xlarge - InstanceType: m5a.xlarge - InstanceType: m6i.xlarge - InstanceType: m6a.xlarge - InstanceType: m4.xlarge

Use price-capacity-optimized allocation strategy — it picks pools with highest Spot availability, reducing interruption risk more than pure lowest-price selection.

// FAQ

Is Spot safe for production?
Yes — with proper architecture. Stateless services behind a load balancer with diversified instance types and a 20% on-demand baseline run on Spot reliably. Companies like Netflix, Lyft, and Airbnb run significant production workloads on Spot.
Should I use a tool like Spot.io instead of managing Spot directly?
Consider automation when fleet management and interruption handling create significant operating work. Evaluate workload interruption tolerance, required controls and operating effort against the vendor’s current product-specific terms. There is no universal spend threshold or guaranteed return.

Get Started

Compare tools and open the linked product overviews.

Compare tools →

// related guides