Skip to main content

Amazon EC2 Fleet

  • What it is
    • A single API call that launches a group (“fleet”) of Amazon EC2 instances across multiple instance types, Availability Zones, and purchase options (On-Demand Instances, Reserved Instances, and Spot Instances) at once.
    • You state a target total capacity and the allocation rules; EC2 Fleet picks the mix to meet it.
  • Why it exists
    • Diversifying across instance types and AZs makes it far easier to get Spot capacity and survive interruptions — you’re not betting on one pool.
    • Blends cheap Spot with a guaranteed On-Demand baseline in one request.
  • Allocation strategies
    • lowest-price — fill from the cheapest pools first.
    • capacity-optimized — draw Spot from the pools with the most spare capacity (fewest interruptions). Usually preferred for Spot.
    • diversified / price-capacity-optimized — balance cost against interruption risk.
  • Capacity model
    • Target capacity can be measured in instances or in vCPUs / memory (“attribute-based instance type selection” — “give me 100 vCPUs, any suitable type”).
  • Not to be confused with
    • Spot Fleet — the older, Spot-focused predecessor. EC2 Fleet is the newer, more general API covering On-Demand + Reserved + Spot; prefer it for new work.
    • EC2 Auto Scaling Group — an ASG also supports a mixed-instances policy and adds ongoing scaling + health replacement. An EC2 Fleet with type maintain overlaps, but ASGs are the usual choice when you want continuous autoscaling; EC2 Fleet when you want a one-shot mixed provision.
  • Fleet request types
    • request — one-time launch, no top-up if instances are interrupted.
    • maintain (default) — keeps the fleet at target capacity, replacing interrupted Spot instances automatically.
    • instant — synchronous launch that returns the instances (or errors) immediately.

Linked from