Sub topic 13
Building a layered purchasing strategy
This chapter assumes you know EC2 instance families, Regions and Availability Zones. It also assumes you have read the earlier chapters on Reserved Instances, Savings Plans and Spot Instances. Here you combine them into one plan.
The idea: match each layer of load to a model
Real workloads are not flat. Demand has a floor that never goes away, a band that changes slowly, and peaks that come and go. A layered strategy gives each band the cheapest model that fits it.
| Layer | Load | Best model | Risk you take on |
|---|---|---|---|
| Baseline | Always running, predictable | Savings Plans (or RIs for capacity needs) | Paying for unused commitment |
| Flexible | Fault-tolerant, can restart | Spot Instances | Interruption with two minutes' notice |
| Peak | Short, unpredictable, must not fail | On-Demand | Highest hourly price |
Step 1: size the baseline conservatively
Commit only to load you are sure will run. A Savings Plan is a dollar-per-hour commitment, so an oversized one bills you for unused hours. Ask Cost Explorer for a recommendation based on recent usage:
aws ce get-savings-plans-purchase-recommendation \
--savings-plans-type COMPUTE_SP \
--term-in-years ONE_YEAR \
--payment-option NO_UPFRONT \
--lookback-period-in-days THIRTY_DAYSTreat the result as a starting point. The recommendation looks at past usage only, so adjust it if you plan to migrate or shut down workloads. Compute Savings Plans suit a baseline that may change instance family, Region or service. Use EC2 Instance Savings Plans or Standard RIs only when the family and Region are stable, because they give a deeper discount in exchange for less flexibility. Use a zonal RI or a capacity reservation only where you must guarantee capacity in one Availability Zone.
Step 2: put the flexible layer on Spot
Run stateless or restartable work on Spot, such as web tiers behind a load balancer, batch jobs and CI workers. An Auto Scaling group with a mixed instances policy can combine the layers in one place. The On-Demand base capacity is what your commitments cover. Everything above it runs on Spot, spread over several instance types:
{
"LaunchTemplate": {
"LaunchTemplateSpecification": {
"LaunchTemplateName": "web-template",
"Version": "$Latest"
},
"Overrides": [
{ "InstanceType": "c5.large" },
{ "InstanceType": "c5a.large" },
{ "InstanceType": "m5.large" }
]
},
"InstancesDistribution": {
"OnDemandBaseCapacity": 2,
"OnDemandPercentageAboveBaseCapacity": 0,
"SpotAllocationStrategy": "price-capacity-optimized"
}
}Here two On-Demand instances form the baseline, and every additional instance is Spot. Savings Plans and RIs apply as billing discounts to the matching On-Demand usage, so the two baseline instances are billed at the committed rate. Spot usage is not covered by them.
Step 3: leave peaks on On-Demand
Short, hard-to-predict spikes are not worth a commitment. Paying the On-Demand rate for a few hours costs less than a commitment that sits idle the rest of the month.
Step 4: measure and adjust
A strategy is only as good as its measurements. Check how much eligible spend your plans covered and how much of the commitment you used:
aws ce get-savings-plans-coverage \
--time-period Start=2026-10-01,End=2026-11-01 \
--granularity MONTHLY
aws ce get-savings-plans-utilization \
--time-period Start=2026-10-01,End=2026-11-01 \
--granularity MONTHLYRead the two numbers together:
- Low utilization means you committed too much. Do not add more commitment until usage grows into it.
- Low coverage with high utilization means there is eligible On-Demand spend left. Buy a little more, in small steps.
Common errors
- Committing to the average load instead of the minimum load. The average includes hours when demand dips below it.
- Buying one large commitment at once. Stagger purchases over weeks so that expiry dates do not all fall together.
- Using one Spot instance type. A single capacity pool dries up together, so diversify.
- Putting stateful or slow-to-recover work on Spot without handling the two-minute notice.
Exercise
A service always runs at least 10 instances and usually 16. Peaks reach 30 for about an hour a day. Its tasks are stateless and restart safely. Which model would you assign to each part?
Show answer
Cover the 10-instance floor with a Savings Plan (Compute if family or Region may change). Run the stateless instances above that on Spot, diversified across instance types. Use On-Demand only as fallback if Spot capacity is unavailable at the peak. Do not commit to 16, because that band is not guaranteed.