TL;DR: Fargate Spot is the same serverless-container platform (no instances to patch or manage) running on spare AWS capacity for up to 70% off — with the catch that AWS can reclaim a task on a 2-minute SIGTERM warning. For fault-tolerant work (batch, ETL, SQS workers, CI/CD builds, dev/test) it's a near-instant win with minimal downside; for user-facing APIs it's a recipe for failed requests. The whole game is: which of your containers can tolerate an occasional 2-minute interruption?
The numbers
- Typically 50–70% off On-Demand Fargate — 1 vCPU + 2 GB ≈ $0.08/hr (~$58/mo) On-Demand vs
$0.03/hr ($22/mo) Spot. - Worked example: 10 tasks (2 vCPU + 4 GB) 24/7 ≈ $1,168/mo On-Demand vs
$365/mo Spot ($803/mo, ~$10K/yr) — still ahead even if 10% of tasks are interrupted and retry. - Interruption handling: AWS sends SIGTERM 2 minutes before termination; queue workers stop pulling and let the in-flight message become visible again, batch jobs resume from an S3 checkpoint.
- Watch the interruption rate: under 5% is great, over 20% means tight regional Spot capacity — shift more to On-Demand.
- Field examples: a nightly ETL (checkpoints every 10 min) saved ~$144/mo finishing 5–10 min later on interruption; a CI/CD pipeline of 200+ builds/day saved ~$75/mo with automatic retries developers barely noticed.
Do this
- Enable it via ECS Capacity Providers (a
FARGATE_SPOTstrategy, e.g. 70% Spot / 30% On-Demand) or an EKS Fargate profile with capacity typeFARGATE_SPOT. - Handle SIGTERM cleanly in every container — stop accepting new work, finish or return the current unit, exit before the 2-minute window closes; test it in dev before production.
- Match the split to tolerance — 100% Spot for fully fault-tolerant batch, 70/30–80/20 for tolerant-with-baseline, 100% On-Demand for critical user-facing services.
- Checkpoint batch progress to S3/DB so an interrupted job resumes instead of restarting; rely on the queue for SQS workers (interrupted messages just get re-picked-up).
- Set CloudWatch alarms on task terminations/interruption rate so a spike is caught before users notice.
Gotchas
- No SIGTERM handling = killed mid-work — the #1 pitfall; implement and test signal handling first.
- 100% Spot for critical workloads causes user-facing failures — a Spot interruption during a request fails it; keep production APIs On-Demand (or ≤10–20% Spot, closely monitored).
- Unmonitored interruption rates hide problems until users complain — alarm on them.
- Its edge over EC2 Spot is serverless (no instances to manage), not fewer interruptions or universal fit.
Skip this if
- The service is a user-facing API or web service with uptime requirements, a long-running stateful task without checkpointing, or a real-time streaming pipeline a 2-minute gap would break — run it On-Demand (use Spot only for its staging/dev copies).
- You want a cluster-wide mixed strategy — build it with ECS Capacity Providers; for larger batch fleets AWS Batch with Spot orchestrates interruptions for you, and Spot Instances covers the EC2 model.