Compute
EC2 purchasing options
The same instance can cost very different amounts depending on how you buy it. Domain 4 tests your ability to match the purchasing option to the workload's pattern.
The options
| Option | Commitment | Typical saving vs On-Demand | Best for |
|---|---|---|---|
| On-Demand | None; pay per second/hour | — | Short-term, unpredictable, new workloads, testing |
| Savings Plans | $/hour spend for 1 or 3 years | Up to ~66% (Compute) / ~72% (EC2 Instance) | Steady usage, with flexibility |
| Reserved Instances (RIs) | Specific instance attributes for 1 or 3 years | Up to ~72% (Standard) / ~66% (Convertible) | Steady-state workloads like databases on EC2 |
| Spot Instances | None; AWS can reclaim with 2-minute warning | Up to ~90% | Fault-tolerant, flexible, stateless or batch work |
| Dedicated Hosts | On-Demand or reserved | — | Licensing per socket/core, compliance |
| Dedicated Instances | On-Demand or reserved | — | Hardware isolation requirements |
| On-Demand Capacity Reservations | Reserve capacity in an AZ; pay whether used or not | None by itself (combine with Savings Plans/RIs for discount) | Guaranteed capacity for events, DR, critical launches |
(Percentages are AWS's published maximums and vary by instance, Region and terms.)
Savings Plans
- Compute Savings Plans — most flexible: apply across instance families, sizes, Regions, OS, and also to Fargate and Lambda.
- EC2 Instance Savings Plans — bigger discount, but tied to an instance family in a Region (size, OS and AZ can change).
- Payment options: all upfront, partial upfront, no upfront (bigger discount for paying more upfront).
Reserved Instances
- Standard RIs — bigger discount; can change AZ, size (within family, Linux) but not family.
- Convertible RIs — can exchange for different families, OS and tenancy; smaller discount.
- Zonal RIs also reserve capacity in that AZ; Regional RIs give flexibility but no capacity reservation.
- Unused RIs can be sold on the RI Marketplace (Standard RIs).
Tip
Savings Plans are generally simpler and more flexible than RIs for compute; RIs remain common for databases (RDS, ElastiCache, Redshift, OpenSearch have their own reserved pricing).
Spot Instances
- Use spare EC2 capacity at large discounts; AWS can interrupt with a two-minute notice (hibernate, stop or terminate).
- Great for: batch jobs, big data (EMR task nodes), CI/CD, rendering, stateless web tiers in mixed fleets, containers.
- Not for: databases or anything that can't tolerate interruption.
- Use EC2 Fleet / Auto Scaling groups with mixed instances policies to combine On-Demand base capacity with Spot, across many instance types and AZs. Prefer the capacity-optimized allocation strategy to reduce interruptions.
Choosing quickly
| Workload pattern | Choice |
|---|---|
| Runs 24/7 for years, predictable | Savings Plans or RIs |
| Unpredictable, short-lived | On-Demand |
| Interruptible, flexible start/end | Spot |
| Baseline steady + bursts | Savings Plan for baseline, On-Demand/Spot for bursts |
| Must have capacity during a known event | Capacity Reservation |
| Licensing tied to physical cores | Dedicated Host |
Related cost tools
- AWS Compute Optimizer — recommends right-sized instance types based on utilisation.
- Cost Explorer — Savings Plans and RI purchase recommendations, coverage and utilisation reports.
Exam patterns
- "A nightly batch job can be restarted if interrupted; minimise cost" → Spot.
- "A database server runs constantly for 3 years" → 3-year Reserved/Savings Plan.
- "Workloads move between EC2 families and also use Fargate and Lambda" → Compute Savings Plans.
- "Ensure capacity is available in a specific AZ for a launch weekend" → On-Demand Capacity Reservation.