TL;DR: ECS Capacity Providers (Nov 2019) let you blend Spot and On-Demand behind a cluster and declare how tasks distribute across them with a base + weight strategy — "always run at least N tasks on On-Demand, spread the rest mostly across Spot." ECS handles placement and, on a 2-minute Spot interruption, drains and reschedules to other pools or On-Demand. For stateless containers at scale it's one of the highest-ROI optimizations in AWS: 60–80% off container compute while the On-Demand baseline keeps you reliable.
The numbers
- Spot is 70–90% off On-Demand (fluctuates; set a max price if needed); the base+weight strategy sets the reliability/cost balance.
base= minimum tasks always on a provider (use On-Demand only);weight= proportional share of the rest. 10 tasks with On-Demand base=2, then weight 1:4:4 across On-Demand/Spot-A/Spot-B → 2 guaranteed + 8 across Spot.- Stacks with other levers — teams combining Capacity Providers + Compute Savings Plans + Compute Optimizer rightsizing + auto scaling report 75–85% total reductions.
- Field examples: a 100+ microservice e-commerce API at 80/20 Spot with 15 instance types cut 65% (~$32K/mo) at ~3% weekly interruption and zero customer outages; a nightly ETL pipeline (10% On-Demand base, 90% Spot, S3 checkpoints every 10 min) cut 70%.
Do this
- Start conservative (30% Spot, 70% On-Demand), monitor a week, then ramp to 50/50 and 70/30 as confidence builds — Capacity Providers add to existing clusters without disrupting running tasks.
- Diversify Spot aggressively — 10+ instance types across families/AZs (separate ASG-backed providers or multiple types per ASG) with capacity-optimized allocation; more pools = fewer interruptions.
- Set
baseon On-Demand only — never give a Spot provider a base, so your critical floor always lands on reliable compute. - Design for graceful restarts — health checks, clean SIGTERM handling, and S3 checkpointing for batch (without checkpoints, interrupted jobs restart from scratch and negate the savings).
- Test interruptions before production — terminate Spot instances in staging and watch task churn; add Fargate Spot as another provider for extra flexibility.
Gotchas
- 100% Spot risks simultaneous interruptions taking down the whole service — always keep an On-Demand base for critical baseline.
- Managed scaling can be quirky (scale-out delays, scale-in hesitation) — some teams disable it and scale the ASG separately.
- Savings vary by region/timing — Spot occasionally nears On-Demand price; monitor and set max prices.
- More moving parts — multiple ASGs, providers, and strategies is real added complexity; start with one Spot provider.
Skip this if
- The service is single-task-critical, has slow startup (>3 min), or a strict latency SLA — run it On-Demand (or a very high On-Demand base); some things aren't worth the interruption risk.
- Batch jobs can't checkpoint — Spot restarts negate the savings. Pair with Fargate Spot for serverless containers, ECS Service Auto Scaling to run only what's needed, and stack Compute Savings Plans on the On-Demand portion.