Sub topic 5
Regional vs zonal RIs and capacity reservation
This chapter assumes you know what an Availability Zone is, how EC2 instance types and families are named, and that a Reserved Instance (RI) is a billing discount, not a running instance. You should also have read the earlier chapters on Standard and Convertible RIs.
Scope decides what an RI does
Every RI has a scope. The scope controls where the discount applies and whether the RI also reserves capacity.
- A Regional RI applies to usage anywhere in one AWS Region. It does not reserve capacity.
- A zonal RI applies to usage in one chosen Availability Zone. It reserves capacity in that zone.
You pick the scope when you buy the RI. A Regional RI can be changed to zonal by modifying it. For a zonal RI, you must choose the zone before purchase.
| Property | Regional RI | Zonal RI |
|---|---|---|
| Discount applies | Any AZ in the Region | One AZ only |
| Capacity reservation | No | Yes |
| Instance size flexibility | Yes, within a family (Linux/Unix, default tenancy) | No, exact size only |
| Typical use | Cost savings with flexibility | Guaranteed capacity in a specific zone |
Instance size flexibility
Regional RIs for Linux/Unix with default tenancy apply across sizes in the same instance family. AWS measures this using normalized units. A large is 4 units, an xlarge is 8, and a 2xlarge is 16.
So one m5.2xlarge Regional RI (16 units) can cover two m5.xlarge instances (8 + 8) or four m5.large instances (4 × 4). A zonal RI does not get this flexibility. It matches only the exact instance type in its zone.
Capacity reservation
AWS does not guarantee that an On-Demand launch will succeed. If a zone runs short of a given instance type, the launch fails with an InsufficientInstanceCapacity error. A zonal RI avoids this for the reserved type, because the capacity is held for you in that zone whether or not you run an instance.
Choosing between them
Ask what you are protecting against.
- If you only want a lower price and your workload can run in any zone, buy a Regional RI. It follows your instances if you move them between zones and covers different sizes.
- If a launch failure in a specific zone would hurt, such as a database that must sit in one zone or a planned event, buy a zonal RI.
- If you need capacity for a short period, a zonal RI is a poor fit, because it requires a one-year or three-year term.
Common errors
- Expecting capacity from a Regional RI. The discount applies, but a launch can still fail. If you need a guarantee, reserve capacity separately.
- Buying a zonal RI in the wrong zone. Zone names such as
us-east-1amap to different physical zones in different accounts. Use the zone ID (for exampleuse1-az1) when coordinating across accounts. - Leaving a zonal RI unused. You pay for it for the whole term. If no matching instance runs in that zone, you are billed for nothing.
- Assuming size flexibility on zonal RIs. It does not apply, so an
m5.xlargeinstance gets no discount from anm5.largezonal RI.
Checking your scope
You can see the scope of your RIs with the CLI:
aws ec2 describe-reserved-instances \
--filters Name=state,Values=active \
--query 'ReservedInstances[].[ReservedInstancesId,InstanceType,Scope,AvailabilityZone]' \
--output tableThe Scope column shows Region or Availability Zone. The AvailabilityZone value is empty for Regional RIs.
Exercise
A team runs six m5.large instances spread across three zones and wants the lowest price. Separately, a payroll database in us-east-1a must always be able to launch a replacement m5.2xlarge during month-end. Which RI scope fits each need, and why?
Show answer
Use a Regional RI for the six m5.large instances. It discounts them in any zone and, with size flexibility, still applies if they change size within the m5 family. Use a zonal RI (or a Capacity Reservation) for the payroll database, because only a zonal RI reserves capacity in us-east-1a for the m5.2xlarge. A Regional RI would give the discount but no capacity guarantee.