All cheat sheets
Computecheat sheet

EC2 Fleet

Spot Fleet's more sophisticated sibling: launch a mix of Spot, On-Demand, and Reserved capacity in one request, balancing cost against guaranteed baseline. 50–80% savings — though for web apps an Auto Scaling Group with a mixed-instances policy usually beats it.

Last reviewed: July 14, 2026

TL;DR: EC2 Fleet (2018) launches a fleet across multiple purchasing options in one request — Spot, On-Demand, and Reserved together — where Spot Fleet is Spot-only. That lets you say "80% Spot for cost, 20% On-Demand as a safety net," getting massive Spot savings plus a guaranteed baseline that doesn't collapse when Spot tightens. It's a capacity-fulfillment tool (best price for the compute you need), while ASGs are scaling-policy tools — and modern ASGs have absorbed most of Fleet's mixing features, so for web apps an ASG usually wins.

The numbers

  • Purchasing options blend: Spot (up to 90% off), On-Demand (full price, always available), Reserved (pre-purchased) — typically 50–80% savings with a small On-Demand baseline.
  • Allocation strategies (the key lever): capacityOptimized / capacityOptimizedPrioritized use AWS interruption data to pick the safest Spot pools — the production go-to; lowestPrice concentrates risk; diversified spreads evenly.
  • Instance weighting lets a target of 100 units mix sizes (m5.large=2, m5.xlarge=4…) so Fleet packs cheaper/more-available pools.
  • Fleet types: maintain (replaces interruptions — production default), request (one-time), instant (synchronous one-shot).
  • Field examples: video encoding on a 10-instance On-Demand base + Spot (c5/c5n/c5a/c6i, capacity-optimized, 30s checkpoints) ran ~70% cheaper than pure On-Demand; a hedge fund's GPU Monte Carlo (2 p3.8xlarge On-Demand + up to 20 Spot) cut 75%.

Do this

  1. Set an On-Demand base for critical workloads (base + Spot percentage), so you always have core capacity even if Spot dries up entirely.
  2. Use capacityOptimized or capacityOptimizedPrioritized for Spot — dramatically lower interruption rates than lowestPrice at similar cost.
  3. Diversify aggressively — 10+ current-gen instance types across multiple AZs; teams that pinned to 3 types hit interruption problems.
  4. Keep the config clean with launch templates + overrides — common settings in the template, instance-type/AZ variation in overrides.
  5. Monitor interruption rates per instance type in CloudWatch and prune the bad actors; design the app to handle the 2-minute warning gracefully.

Gotchas

  • Over-complicated configs (50 types + elaborate weighting) are a common trap — start with 5–10 types and iterate.
  • Launch-template updates don't replace running instances — you must recycle instances or create a new fleet.
  • Spot isn't guaranteed even diversified — always keep an On-Demand fallback for critical capacity.
  • No built-in load balancer integration — Fleet doesn't auto-register with ALB/NLB the way an ASG does.

Skip this if

  • It's a web app or service needing metric-based scaling and ALB/NLB integration — use an Auto Scaling Group with a mixed-instances policy instead (better CloudWatch/LB integration, same Spot economics).
  • It's fault-tolerant batch wanting maximum savings with no reliability floor — Spot Fleet is simpler; for the underlying model see Spot Instances. Cover the always-on baseline with Reserved Instances.

Run this audit with your AI assistant

Paste this into Claude, ChatGPT, or any agent that can run the AWS CLI with read-only credentials. It audits your account for exactly the waste this sheet describes — and changes nothing.

You are auditing an AWS account's EC2 Fleet / mixed-capacity provisioning.
Use the AWS CLI with READ-ONLY credentials. Do not create, modify, or
delete anything — report findings and recommended (unapplied) fixes only.

1. Inventory: aws ec2 describe-fleets (and describe-spot-fleet-requests)
   — capture target capacity, On-Demand vs Spot split, allocation
   strategy, instance-type diversity, and fleet type (maintain/request/
   instant).
2. Diversity + strategy: flag fleets pinned to <5 instance types or using
   lowestPrice for Spot (concentration risk); recommend
   capacityOptimized / capacityOptimizedPrioritized and 10+ types across
   AZs.
3. Reliability: flag production fleets running near-100% Spot with no
   On-Demand base; recommend an On-Demand baseline sized to critical
   capacity.
4. Fit vs ASG: for web/service workloads needing metric-based scaling +
   ALB/NLB integration, recommend an Auto Scaling Group with a mixed-
   instances policy instead of raw EC2 Fleet.

Report a table: fleet | target | On-Demand base | Spot % | allocation |
#types | recommendation | est. $/mo saved. Change nothing.
Works with any assistant that can run shell commands.

Want the guided version?

The EC2 Fleet walkthrough covers this topic interactively — it asks about your setup, branches to what’s relevant, and quizzes you on the tricky parts. Free and anonymous.

Start the walkthrough