Homeβ€Ί Blogβ€Ί AWS Architecture Series #123 β€” The default warm pool is the size of your emergency headroom…
AWS Architecture AWS Architecture Series

AWS Architecture Series #123 β€” The default warm pool is the size of your emergency headroom

A warm pool keeps pre-initialized instances alongside an Auto Scaling group so a scale-out does not wait for a slow boot. Two things about it are easy to get wrong. Its default size is the difference between the group's maximum and desired capacity, and maximum capacity is usually headroom reserved for an emergency - so switching a warm pool on provisions instances from capacity you never intended to run. And Auto Scaling stops or hibernates instances as they enter the pool without waiting for user data to finish, so a warm pool added without a lifecycle hook can stop an instance mid-bootstrap and then put it into service during a scale-out before it is ready. The documentation opens by telling you that you probably do not need the feature at all.

Verified against current vendor documentation on 24 November 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

The last post noted in passing that a warm pool can stop an instance before its user data finishes. That caveat turns out to be the central thing to understand about warm pools, and it sits next to a sizing default that can provision far more instances than anyone intended.

It is also the only feature in this run of posts whose documentation opens by arguing against itself.

1AWS leads with a warning, not a recommendation

“Creating a warm pool when it's not required can lead to unnecessary costs. If your first boot time does not cause noticeable latency issues for your application, there probably isn't a need for you to use a warm pool.”

That is the first thing on the page, before the feature is explained. It is a narrow tool for a specific fault — instances that take a long time to boot, for example because they “need to write massive amounts of data to disk” — and the honest reading is that most groups should not have one.

2The default size is derived from your maximum capacity

“By default, the size of the warm pool is calculated as the difference between the Auto Scaling group's maximum capacity and its desired capacity.”

Maximum capacity is normally headroom: the ceiling you set so an emergency spike has somewhere to go. Deriving the pool from it means enabling a warm pool provisions instances from capacity you specifically did not intend to run. The documentation's own large example makes the point — a group of 1,000 with a maximum of 1,500 would otherwise keep 500 instances “reserved for future use inside the warm pool”, where a pool of 100 is what you actually wanted.

3The pool stops instances without waiting for them to finish booting

“Amazon EC2 Auto Scaling stops or hibernates instances as they enter the warm pool, and does not wait for user data to finish running.”

And the consequence, stated plainly: “If you add a warm pool to your Auto Scaling group without a lifecycle hook, instances that take a long time to finish initializing could be stopped or hibernated and then put in service during a scale-out event before they are ready.”

A feature bought because instances boot slowly will, misconfigured, interrupt exactly those slow boots and then serve traffic from the result.

Architecture

Diagram: Amazon EC2 Auto Scaling warm pools. A warm pool is a pool of pre-initialized EC2 instances alongside an Auto Scaling group, and as instances leave the pool they count toward the group's desired capacity, a warm start. The documentation opens with a warning: creating a warm pool when it is not required can lead to unnecessary costs, and if first boot time does not cause noticeable latency issues there probably is not a need for one. By default the pool size is the difference between the group's maximum and desired capacity, so desired 6 with maximum 10 gives a pool of 4, and the documentation's large example contrasts 500 instances reserved for future use against a deliberate pool of 100 for a group of 1,000 with a maximum of 1,500. MaxGroupPreparedCapacity specifies the maximum number of instances allowed in the warm pool or in any state except Terminated for the group, so it targets combined capacity rather than the pool alone, and MinSize floors the pool and can carry combined capacity above it; only equal values give the pool an absolute size. Three states are available: Stopped, where you pay only for the volumes you use and the Elastic IP addresses attached, described as an effective way to minimize costs; Hibernated, which saves RAM to the EBS root volume so you pay for EBS including storage for the RAM contents plus Elastic IPs; and Running, which is possible but highly discouraged to avoid incurring unnecessary charges. The critical interaction is with lifecycle hooks: Auto Scaling stops or hibernates instances as they enter the pool and does not wait for user data to finish running, so the action can interrupt long-running user data, and without a lifecycle hook instances that take a long time to initialize could be stopped or hibernated and then put in service during a scale-out before they are ready. On scale in the default is to terminate instances and launch new ones into the pool, while an instance reuse policy returns them instead, falling back to stopped when they do not meet hibernation requirements. Instance-based scaling considers instances in the InService state rather than warm pool instances, though custom metrics aggregate according to their own implementation. A depleted pool means instances launch directly into the group, a cold start. An instance that fails to reach InService is treated as a failed launch and terminated regardless of the underlying cause. Warm pools are not supported with weighted mixed instance groups, require an EBS root volume to stop or hibernate, and an instance refresh replaces InService instances before pool instances.

Sizing: one derived default and two explicit controls

SettingBehaviour
Default sizemaximum capacity − desired capacity. Desired 6, maximum 10 gives a pool of 4
MaxGroupPreparedCapacityTarget combined capacity of the group and its pool. Pool size becomes this value minus desired capacity, subject to MinSize — so combined capacity can exceed it
MinSizeFloors the pool. “There is no minimum size set by default”

The name invites a misreading, and the API reference is the precise statement: MaxGroupPreparedCapacity “Specifies the maximum number of instances that are allowed to be in the warm pool or in any state except Terminated for the Auto Scaling group.” It bounds the combined set — group plus pool — not the pool alone. The pool size is then the difference between that value and desired capacity.

And it is a target rather than a hard ceiling, because the floor wins: “If the desired capacity of the Auto Scaling group is higher than the MaxGroupPreparedCapacity, the capacity of the warm pool is 0, unless you specify a value for MinSize.” So with both set, a busy group can push combined capacity above MaxGroupPreparedCapacity. That is usually what you want — without the floor, the pool empties exactly when you most wanted a warm start — but it means the setting does not cap what you pay for.

One consequence worth knowing if you are trying to reason about cost: “The size of the warm pool is dynamic. Only when MaxGroupPreparedCapacity and MinSize are set to the same value does the warm pool have an absolute size.”

What each state actually bills

StateYou pay forAWS's view
StoppedThe volumes you use and the Elastic IP addresses attached“an effective way to minimize costs”
HibernatedEBS volumes “including storage for the RAM contents”, and Elastic IPsKeeps memory; restores RAM on start
RunningThe instance, in full“highly discouraged”

Hibernation is the interesting middle. It “signals the operating system to save the contents of your RAM to your Amazon EBS root volume”, so a warm start restores a process that was already running rather than one that has to start. The cost is EBS storage for the whole of RAM, which on memory-heavy instances is not trivial — an instance parks as much EBS as it has memory. That is the trade: pay for memory on disk to avoid paying for memory in RAM.

Why a lifecycle hook matters more here than anywhere else

The previous post treated hooks as a readiness mechanism for the main group. In a warm pool they are load-bearing in a second way: “In a warm pool configuration, lifecycle hooks delay instances from being stopped or hibernated and from being put in service during a scale-out event until they have finished initializing.”

Two delays, not one. The hook holds the instance before it is stopped on the way into the pool, and holds it again before it goes into service on the way out. Remove the hook and both protections go, which is why the documentation's warning is about a sequence rather than a single event: the instance is stopped mid-bootstrap, then later resumed and put into service, and the half-finished initialization is now baked into a running member of the group.

There is a related detail for anyone relying on user data to re-run after the pool restart. The script does not run again by default; it needs the MIME multi-part form with cloud_final_modules set to [scripts-user, always]. So an instance that was interrupted mid-script does not get a second attempt unless you asked for one.

Scale-in: terminate, or return to the pool

“By default, Amazon EC2 Auto Scaling terminates your instances when your Auto Scaling group scales in. Then, it launches new instances into the warm pool to replace the instances that were terminated.”

So the default behaviour pays the full initialization cost twice: once for the instance you just threw away, and again for its replacement in the pool. An instance reuse policy changes that — “If you want to return instances to the warm pool instead, you can specify an instance reuse policy” — and for a workload whose boot is expensive enough to justify a warm pool at all, reuse is almost certainly what you want.

One caveat if you reuse into hibernation: “If they don't, when instances return to the warm pool, they will fallback to being stopped instead of being hibernated.” The fallback is silent, so a group you believe is hibernating may be stopping, with the warm start you were paying RAM-on-disk for quietly absent.

How scaling policies treat pool instances

“While instances are in the warm pool, your scaling policies only scale out if the metric value from instances that are in the InService state is greater than the scaling policy's alarm high threshold.”

That is the right design for the instance-based case: a stopped instance contributing zero CPU to a target-tracking average would suppress scaling exactly when it is needed.

The scope is worth stating carefully, though. AWS's documented instance-based scaling behavior considers instances in the InService state rather than warm pool instances. However, custom scaling metrics must be designed to exclude warm pool instances where appropriate, since their aggregation depends on the metric implementation. A policy tracking a queue depth, a business-level counter, or anything you publish yourself is aggregated the way you wrote it, and nothing about the warm pool changes that.

Where the pool silently does not help

  • Depletion. “If your warm pool is depleted when there is a scale-out event, instances will launch directly into the Auto Scaling group (a cold start).” The failure mode of a warm pool is the behaviour you had before you built it, which makes it easy not to notice.
  • Failed launches. An instance that cannot reach InService is “considered a failed launch and terminated. This applies regardless of the underlying cause, such as an insufficient capacity error or any other factor.”
  • Weighted and Spot mixed groups. “Warm pools aren't supported with weighted mixed instance groups”, and a mixed instances policy must be On-Demand only.
  • Instance store roots. Stopping or hibernating requires “an Amazon EBS volume as its root device”.
  • AMI updates. “An instance refresh first replaces InService instances. Then it replaces instances in the warm pool” — so the pool is the last place a new image lands, and a pool built from the previous AMI keeps serving warm starts until the refresh reaches it.

Why This Architecture Holds Up

Opening with a warning is the most useful thing on the page

A feature page that begins by telling you when not to adopt the feature is doing something rare. Warm pools solve a genuine problem for a narrow set of workloads and cost money continuously for everyone else, so putting the disqualifying question first is better engineering writing than any amount of guidance further down.

Excluding the pool from scaling metrics is quietly correct

It would have been easy to let pool instances appear in group metrics and much harder to debug. Scoping scaling decisions to InService instances keeps the pool a pure latency optimisation with no effect on when the group grows.

Making reuse opt-in is defensible, if expensive by default

Returning a scaled-in instance to the pool means reusing an instance that has served traffic, with whatever state that left behind. Defaulting to terminate-and-relaunch is the conservative choice. It does mean the default pays the initialization cost twice, so for most warm pool workloads the opt-in is the one you want — but the default errs towards a clean instance, which is the right direction to err.

Key Architecture Decisions

DecisionTakeWhy
Whether to have a warm pool Only if first boot time causes measured latency problems AWS's own opening guidance, and the pool bills continuously
Pool size Set MaxGroupPreparedCapacity, and MinSize with it; set both equal for a fixed pool The default is max minus desired, which is your emergency headroom; only equal values give the pool an absolute size
Pool state Stopped unless restoring RAM genuinely saves the boot Hibernation bills EBS for the whole of RAM; Running is discouraged outright
Lifecycle hook Strongly recommended where instances need initialization before stopping, hibernating or entering service; set the heartbeat timeout, completion conditions and DefaultResult deliberately Without one the pool can interrupt bootstrap and then serve traffic from the instance — but a hook's presence alone does not guarantee initialization completed
Scale-in Instance reuse policy, if the workload tolerates a reused instance The default pays the initialization cost twice per scale-in
Monitoring Alarm on cold starts and on pool size reaching zero A depleted pool degrades to the behaviour you had before, invisibly

The audit worth running

  • Every warm pool with no MaxGroupPreparedCapacity set, compared against the group's maximum capacity. That difference is what you are paying for. Where it is set, check MinSize too, since the floor can carry combined capacity above it.
  • Every warm pool without a launching lifecycle hook. Those pools can stop instances mid-bootstrap.
  • Every pool configured for Hibernated, checked against the hibernation prerequisites, since the fallback to Stopped is silent.
  • Any group whose user data is long-running and does not use cloud_final_modules: [scripts-user, always], because an interrupted script will not re-run.

Closing Thought

Four posts into the Auto Scaling material, a pattern in the defaults is hard to miss. The health check grace period defaults differently depending on which tool you use. A lifecycle hook's DefaultResult defaults to ABANDON. A warm pool's size defaults to your emergency headroom, and its scale-in behaviour defaults to paying for initialization twice. None of these are wrong, exactly; each is defensible in isolation. But the aggregate effect is that an Auto Scaling group assembled from defaults behaves in ways nobody chose.

The warm pool is the clearest case, because the cost is continuous rather than conditional. A group with desired 6 and maximum 10 quietly keeps four instances' worth of volumes and addresses, forever, on the strength of a checkbox. That is a small bill, and it is also the shape of a large one at a thousand instances.

So the useful discipline with this feature is the one its own documentation opens with: establish that first boot time is actually hurting you, with a number, before adding a pool. And if you add one, add a lifecycle hook in the same change for any instance that needs initialization before being stopped, hibernated or put into service — configuring the heartbeat timeout, the completion condition and the DefaultResult rather than accepting the defaults. A hook is not an AWS requirement and its presence alone does not prove initialization finished; it is the only place you get to say so.

Next in this series

Reliability — Amazon EC2 Auto Scaling instance refresh: what a rolling replacement actually checks before moving on, how minimum healthy percentage and the instance warmup interact, what a checkpoint pauses, and why a refresh can roll forward onto an AMI that was never meant to ship.

Official AWS Reference

Comments

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