Business Challenge
Post #131 said a multi-AZ volume's failover needs an instance in the standby zone and that EC2 capacity is not guaranteed unless you reserve it. Post #132 said an autoshift will not wait for a scaling action. Post #133 said the capacity has to be standing there before the event. Each one pointed at a reservation and moved on. This is the reservation.
It is a smaller promise than the phrase "reserved capacity" suggests, and its default behaviour is the part to understand first.
A reservation is defined by four attributes — Availability Zone, instance type, platform and tenancy — and “Only instances that match these attributes can launch or run in the Capacity Reservation.” Which instances actually consume it is a separate setting, and it has two values.
Open, the default: “The Capacity Reservation automatically matches all instances that have matching attributes (instance type, platform, and Availability Zone).” And the consequence, which is the sentence worth keeping: “New and existing instances that have matching attributes automatically run in the Capacity Reservation without any additional configuration.”
Existing instances. So a reservation created for a standby database is immediately available to a batch job, a test instance, or anything else of that shape already running in that zone. Targeted matching is the remedy — “The instance must specifically target the Capacity Reservation to launch or run in its reserved capacity” — and the documentation says why it exists: it “helps you avoid unintentional reserved capacity usage”.
“Capacity Reservations are charged at the equivalent On-Demand rate whether you run instances in reserved capacity or not”. Unused, it appears as a line item — “If you do not use the reservation, this shows up as unused reservation on your Amazon EC2 bill”. Used, the charge moves rather than doubling: “When you run an instance that matches the attributes of a reservation, you just pay for the instance and nothing for the reservation.”
So the cost of standby capacity is one instance-equivalent per reserved slot, continuously, whether anything occupies it. That is the honest price of the static stability #133 argued for, and it is why open matching is financially invisible: a dev box quietly consuming your failover reservation changes nothing on the bill. It changes only whether the capacity is there when you fail over.
Two limits worth knowing before relying on one in a recovery plan.
“Capacity Reservations do not ensure that a hibernated instance can resume after you try to start it.” And when a reservation ends, “Instances running in the reserved capacity continue to run uninterrupted” — but a stopped instance that targets it is stuck: “If instances targeting a Capacity Reservation are stopped, you can't restart them until you remove their Capacity Reservation targeting preference” or point them at another one.
A reservation holds a slot of a given shape in a given zone. It does not hold your particular instance, and it does not make a stop-start cycle safe.
Architecture
How an Auto Scaling group reaches reserved capacity
The mechanism is distribution segments: “Use distribution segments to configure your Auto Scaling group to consume multiple Capacity Reservation types”, pointed at a Capacity Reservation Resource Group. The prerequisite is explicit — “you must create the Capacity Reservations that you want to consume and the Capacity Reservation Resource Group that contains them” before configuring the group.
You give it an ordered list of capacity types, and “The order of the list determines how Auto Scaling distributes launched instances”, with “When a particular capacity type is unavailable, Auto Scaling skips that type and moves on to the next one.”
| Target capacity type | What it is | Position |
|---|---|---|
on-demand-capacity-reservation | Your reserved slots | Usually first |
capacity-block | Capacity Blocks for ML | Any |
interruptible-capacity-reservation | Interruptible reservations | Any |
on-demand | Ordinary On-Demand | Last, or absent |
Whether you include that last row is the design decision, and it is binary:
“If you omit” on-demand,
“instances fail to launch when reserved capacity is unavailable”. Include it and
“it must be the last entry in the list”.
That is a genuinely useful choice rather than a trap. Omitting on-demand turns the
reservation into a hard ceiling: the group cannot exceed the capacity you have paid for, and a
runaway scaling policy fails to launch instead of generating a surprise bill. Including it means the
group keeps serving traffic past the reservation and you pay On-Demand for the overflow. Which you
want depends on whether the greater risk is unavailability or spend.
Scale-in protects the capacity you paid for
“Auto Scaling terminates instances in the opposite order of your”
TargetCapacityTypes. So with reservations first and On-Demand last, scale-in removes
On-Demand instances first and reservation-backed instances last.
That is the right default and it is worth noticing why: scaling in would otherwise release the capacity you are paying for regardless, leaving you holding an unused reservation while running On-Demand instances beside it. The ordering keeps the bill coherent on the way down as well as up, and it composes with the termination policies from post #128 rather than replacing them.
One behaviour here is a foot-gun, though, and it is a configuration change rather than an incident: “existing instances of that removed type are terminated before any instance whose type is still in the list”. Editing the list to drop a capacity type terminates the running instances backed by it. That is an API call that ends instances, which is not what editing a policy usually does.
What you give up
Two capabilities are unavailable with distribution segments, and the first will matter to anyone who has followed this series:
- “Warm pools are not supported with distribution segments” — so the pre-initialised instance pool and reserved capacity are mutually exclusive. Both exist to make capacity available faster; you can have one.
- “Spot capacity is not supported as a target capacity type in distribution segments” — a group using segments cannot also blend in Spot through the same mechanism.
There is also a shape limit: “Auto Scaling currently supports only one distribution segment per Auto Scaling group”, so the entire group's capacity follows one priority order. You cannot give the baseline a different reservation strategy from the burst.
Savings Plans stack with this, zonal Reserved Instances do not
A Capacity Reservation is a capacity instrument, not a discount instrument, and the two compose: “Billing discounts for Savings Plans and Regional Reserved Instances apply to Capacity Reservations.” The ordering is stated too — “Discounts are preferentially applied to instance usage before covering unused Capacity Reservations”, so a partially used reservation puts your discount where instances are actually running first.
The exception to check against your own commitments: “Billing discounts for zonal Reserved Instances do not apply to Capacity Reservations.” A zonal RI already carries a capacity reservation of its own, so pairing one with an ODCR for the same shape is paying for the same assurance twice.
Future-dated reservations, and what they commit you to
If the capacity you need does not exist yet, a future-dated reservation is the path, and it is a
commitment rather than a request.
“You can request a future-dated Capacity Reservation between 5 and 120 days in
advance”, with
“We recommend that you make the request at least 56 days (8 weeks) in advance”.
AWS then assesses it —
“The assessment is typically completed within 5 days” — and
“If a request can't be supported, the Capacity Reservation enters the”
unsupported state.
The commitment is the part to plan around: “The minimum commitment duration is 14 days for most instance types, or 12 weeks for U and X instances.” Twelve weeks on the large memory families is a different kind of decision from fourteen days.
One more constraint that catches people: “Active and unused Capacity Reservations count toward your On-Demand Instance limits”, so reserving capacity consumes quota whether or not anything runs in it. And “Capacity Reservations can't be used with Dedicated Hosts”.
Why This Architecture Holds Up
Open matching defaults to convenience, and that is defensible
Most people creating a reservation want their existing fleet to use it immediately, and open matching does that with no further configuration. The alternative default would leave new reservations sitting unused and billed while engineers worked out targeting. The documentation compensates by stating the risk directly rather than hiding it — the warning about unintentional capacity usage is on the concepts page, not buried in a footnote.
Making the fallback explicit is better than guessing
A system that silently fell back to On-Demand would surprise people with a bill; one that silently
refused would surprise them with an outage. Requiring on-demand to be present or absent
in an ordered list makes the choice visible in the configuration, and puts it in the same place as
the priority order rather than in a separate flag.
Terminating reservation-backed instances last is the coherent order
A scale-in order that did not do this would have the group give back capacity you continue to pay for while keeping instances you pay extra for. Reversing the priority list is the simple rule that produces the right result without a separate policy, and it means the priority order you set for launching is also the one that governs removal.
Key Architecture Decisions
| Decision | Take | Why |
|---|---|---|
| Matching criteria for a failover reservation | Targeted, always | Open matches existing instances automatically, with no bill signal |
| Matching criteria for general fleet capacity | Open is reasonable | You want the fleet to use what you bought |
Including on-demand in the segment |
Include it for serving tiers; omit for cost ceilings | Omitting means launches fail rather than overspend |
| Warm pools | Choose one: warm pool or distribution segments | Not supported together |
| Editing the capacity type list | Treat as a change that terminates instances | Removed types are terminated first |
| Existing zonal Reserved Instances | Do not buy an ODCR for the same shape | Zonal RI discounts do not apply, and it already reserves capacity |
| Savings Plans | Keep them; they apply | Discounts land on instance usage first |
| U and X instance families | Plan 12 weeks of commitment | Minimum commitment is longer than for other types |
The audit worth running
- Every reservation created for a failover or standby, checked for open matching. If it is open, something may already be sitting in it, and the bill will not tell you.
- Reservations against your On-Demand instance quota, since unused ones consume it.
- Any group that has both a warm pool and an expectation of reserved capacity — that combination does not exist.
- Zonal Reserved Instances held alongside Capacity Reservations for the same instance shape and zone.
Closing Thought
Four posts have now converged on the same idea from different directions. A multi-AZ volume needs an instance waiting in the standby zone. An autoshift will not wait for a scaling action. Static stability says the capacity must be there before the event. All three depend on a reservation, and a reservation turns out to be a slot of a given shape in a given zone, billed continuously, that by default any matching instance may occupy.
That last clause is the one worth carrying. The reliability argument in #133 assumed the capacity would be present when needed. Open matching is the mechanism by which it quietly is not — not through a failure, not through a misconfiguration anyone would notice, and with no change to the bill, because the charge is the same whether the slot holds your standby database or a batch job that happens to be the same instance type.
The finding I would act on is a one-line check: list your Capacity Reservations and look at the matching criteria column. Anything bought for a failover that says open is a reservation you are paying for and might not have.
Official AWS Reference
- Concepts for Amazon EC2 Capacity Reservations — the four reservation attributes and that only matching instances can launch or run in the reservation, the open and targeted instance matching criteria including that open automatically matches new and existing instances with no additional configuration and that targeted helps avoid unintentional reserved capacity usage, that instances continue to run uninterrupted after a reservation ends while stopped instances targeting it cannot restart, and the future-dated request window, assessment time, unsupported state and minimum commitment durations
- Use Distribution Segments to target multiple Capacity Reservation types — that distribution segments configure an Auto Scaling group to consume multiple Capacity Reservation types, the four target capacity types and that list order determines distribution with skipping when a type is unavailable, that omitting on-demand makes launches fail when reserved capacity is unavailable and that it must otherwise be last, the single-segment limit, the Capacity Reservation Resource Group prerequisite, the reverse scale-in ordering, that removing a type terminates its instances first, and that warm pools and Spot capacity are not supported
- Capacity Reservation pricing and billing — that reservations are charged at the equivalent On-Demand rate whether or not instances run in them, that an unused reservation appears as unused reservation on the bill, that a matching running instance is billed as the instance with nothing for the reservation, and that Savings Plans and Regional Reserved Instance discounts apply and are preferentially applied to instance usage while zonal Reserved Instance discounts do not apply
- Reserve compute capacity with EC2 On-Demand Capacity Reservations — that reservations do not ensure a hibernated instance can resume, that active and unused reservations count toward On-Demand instance limits, and that reservations cannot be used with Dedicated Hosts
- Capacity Reservation Resource Groups — further reading on the resource group a distribution segment targets; no claims in this post are drawn from it
- REL11-BP05 Use static stability to prevent bimodal behavior — further reading, the guidance this capacity sits underneath, covered in post #133; no claims in this post are drawn from it
Comments