Homeβ€Ί Blogβ€Ί AWS Architecture Series #134 β€” A reservation your dev box can spend…
AWS Architecture AWS Architecture Series

AWS Architecture Series #134 β€” A reservation your dev box can spend

Three posts have ended at the same sentence: EC2 capacity is not guaranteed unless you reserve it. This is the mechanism those posts pointed at. A Capacity Reservation has two instance matching criteria, and the default one is open, which automatically matches all instances that have matching attributes - new and existing - without any additional configuration. The documentation says plainly that this could lead to unintentional capacity usage and prevent you from launching new instances for the full requested instance count. Targeted matching exists precisely to avoid that, and an Auto Scaling group reaches reserved capacity through distribution segments, which prioritise On-Demand Capacity Reservations, Capacity Blocks for ML, interruptible reservations and On-Demand in an order you choose. Three constraints decide whether that works: omitting on-demand from the list means instances fail to launch when reserved capacity is unavailable, warm pools are not supported with distribution segments, and removing a reservation type from the list terminates the instances of that type before any instance whose type is still in the list.

Verified against current vendor documentation on 5 December 2026. Pricing, limits and API behaviour were checked against the official docs on that date. Cloud services change fast — if you are reading this much later, treat the specifics as a starting point and re-check the linked sources.

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.

1Open matching will spend your reservation on anything that fits

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”.

2You pay for it either way

“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.

3A reservation is not a reservation of your instance

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

Diagram: how an Amazon EC2 Auto Scaling group consumes On-Demand Capacity Reservations, and what the default matching criteria do. A Capacity Reservation is defined by Availability Zone, instance type, platform and tenancy, and only instances that match these attributes can launch or run in the Capacity Reservation. Instance matching criteria decide which of those instances actually consume it. Open, the default, automatically matches all instances that have matching attributes, and new and existing instances that have matching attributes automatically run in the Capacity Reservation without any additional configuration, which the documentation warns could lead to unintentional capacity usage. Targeted matching accepts only instances that explicitly target the reservation, and exists to help avoid unintentional reserved capacity usage. Billing is the same either way: Capacity Reservations are charged at the equivalent On-Demand rate whether you run instances in reserved capacity or not, an unused reservation shows up as unused reservation on the Amazon EC2 bill, and when an instance matching the attributes runs you just pay for the instance and nothing for the reservation. Billing discounts for Savings Plans and Regional Reserved Instances apply to Capacity Reservations and are preferentially applied to instance usage before covering unused Capacity Reservations, while billing discounts for zonal Reserved Instances do not apply. An Auto Scaling group reaches reserved capacity through distribution segments, which configure the group to consume multiple Capacity Reservation types: on-demand-capacity-reservation, capacity-block for Capacity Blocks for ML, interruptible-capacity-reservation, and on-demand. The order of the list determines how Auto Scaling distributes launched instances, and when a particular capacity type is unavailable Auto Scaling skips that type and moves on to the next one. If on-demand is omitted from the list, instances fail to launch when reserved capacity is unavailable, and if it is included it must be the last entry in the list. Auto Scaling currently supports only one distribution segment per Auto Scaling group, and the prerequisite is that the Capacity Reservations and a Capacity Reservation Resource Group containing them already exist. On scale in, Auto Scaling terminates instances in the opposite order of the target capacity types, so On-Demand instances go first and the highest-priority reservation-backed instances go last. If the distribution segments are updated to remove a reservation type, existing instances of that removed type are terminated before any instance whose type is still in the list, so a configuration change terminates running instances. Two capabilities are given up: warm pools are not supported with distribution segments, and Spot capacity is not supported as a target capacity type in distribution segments. Other limits are that Capacity Reservations do not ensure that a hibernated instance can resume after you try to start it, active and unused Capacity Reservations count toward On-Demand Instance limits, Capacity Reservations cannot be used with Dedicated Hosts, instances running in reserved capacity continue to run uninterrupted after a reservation ends, and instances targeting a reservation that are stopped cannot be restarted until their targeting preference is removed. A future-dated reservation can be requested between 5 and 120 days in advance with a recommendation to request at least 56 days, that is 8 weeks, ahead, is assessed typically within 5 days, carries a minimum commitment duration of 14 days for most instance types or 12 weeks for U and X instances, and enters the unsupported state if the request cannot be supported.

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 typeWhat it isPosition
on-demand-capacity-reservationYour reserved slotsUsually first
capacity-blockCapacity Blocks for MLAny
interruptible-capacity-reservationInterruptible reservationsAny
on-demandOrdinary On-DemandLast, 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

DecisionTakeWhy
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

Comments

How was your experience?
Your feedback helps improve this site.
PoorExcellent