Homeβ€Ί Blogβ€Ί AWS Architecture Series #130 β€” A terminated instance on standby is still reported healthy…
AWS Architecture AWS Architecture Series

AWS Architecture Series #130 β€” A terminated instance on standby is still reported healthy

The Standby state is how you take an instance out of an Auto Scaling group to patch or debug it without the group terminating it underneath you. It does that job. What it also does is stop health checks on that instance and freeze its last known status, and AWS illustrates the consequence with its own example: put a healthy instance on standby, terminate it, and Auto Scaling continues to report it as healthy. The status is not re-evaluated until you put the instance back in service. Two other things are easy to get wrong. Entering standby does not decrement desired capacity unless you ask it to, so by default Auto Scaling launches a replacement and you are running both. And you are billed for instances in a standby state, so an instance parked for an investigation that nobody finished is a line item with no traffic.

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

The previous post ended on suspended processes, which are the blunt instrument for stopping Auto Scaling interfering with an investigation: they apply to the whole group. Standby is the precise one. It takes a single instance out of service, leaves it in the group, and lets you work on it.

“Instances that are on standby are still part of the Auto Scaling group, but they do not actively handle load balancer traffic.” And the purpose is exactly what the previous ten posts kept running into: “This feature helps you stop and start the instances or reboot them without worrying about Amazon EC2 Auto Scaling terminating the instances as part of its health checks or during scale-in events.”

It works. The mechanism it uses to work is the thing to understand.

1Health status freezes, and AWS's own example is a terminated instance

“Amazon EC2 Auto Scaling does not perform health checks on instances that are in a standby state. While the instance is in a standby state, its health status reflects the status that it had before you put it on standby.”

That is how standby protects the instance: there is no verdict to act on, because no verdict is being formed. But the stale status is still reported, and the documentation illustrates what that means with the sharpest example available:

“For example, if you put a healthy instance on standby and then terminate it, Amazon EC2 Auto Scaling continues to report the instance as healthy.”

A terminated instance, reported healthy, for as long as it stays in standby. Not a bug — the status field means the last check, and the last check was before you started. But any dashboard, script or alarm reading instance health from the group is reading a value that stopped tracking reality the moment you called enter-standby.

The reckoning comes on the way back: “If you attempt to put a terminated instance that was on standby back in service, Amazon EC2 Auto Scaling performs a health check on the instance, determines that it is terminating and unhealthy, and launches a replacement instance.”

2By default you end up running both instances

Entering standby takes an instance out of service, which leaves the group below its desired capacity — unless you say otherwise, Auto Scaling fixes that the only way it knows how:

“If you choose not to decrement the desired capacity of the Auto Scaling group, Amazon EC2 Auto Scaling launches an instance to replace the one on standby.” Against: “If you choose to decrement the desired capacity of the Auto Scaling group, this prevents the launch of an instance to replace the one on standby.”

The intent is sound — it keeps capacity up while you work. The consequence is that the default path leaves you paying for the instance you are debugging and its replacement, because of the other sentence on the page: “You are billed for instances that are in a standby state.”

In the CLI the decrement is an explicit flag, --should-decrement-desired-capacity. In the console it is the Replace instance checkbox, selected by default — so clicking through gives you the replacement, and scripting without the flag gives you the same.

3Exiting standby can fail on the group's own limits

“After you put the instance back in service, the desired capacity is incremented to reflect how many instances are in the Auto Scaling group.” And then the constraint:

“To do the increment (and decrement), the new desired capacity must be between the minimum and maximum group size. Otherwise, the operation fails.”

So the return journey is not guaranteed. A group already at its maximum — because it scaled out while your instance sat in standby — cannot increment, and exit-standby fails. The instance stays in standby, still billed, still reporting whatever status it had when you parked it.

The same rule applies on the way in: decrementing below the group's minimum fails too. A group of two with a minimum of two cannot have an instance put into standby with the decrement.

Architecture

Diagram: Amazon EC2 Auto Scaling Standby state. An instance in the Standby state is still part of the Auto Scaling group but does not actively handle load balancer traffic, which lets you stop, start or reboot it without Auto Scaling terminating it through health checks or scale-in. On entering standby, if a load balancer target group or Classic Load Balancer is attached the instance is deregistered from the load balancer, and if connection draining is enabled Elastic Load Balancing waits 300 seconds by default before completing deregistration so in-flight requests can finish; on exiting standby the instance is registered with the load balancer again. Entering standby offers a choice about desired capacity: if you choose not to decrement it, Auto Scaling launches an instance to replace the one on standby, so you run and pay for both, and if you choose to decrement it no replacement is launched. The decrement is the --should-decrement-desired-capacity flag in the CLI and the Replace instance checkbox in the console, which is selected by default. After the instance returns to service the desired capacity is incremented, and both the increment and the decrement require the new desired capacity to fall between the group's minimum and maximum size or the operation fails, so exiting standby can fail if the group has since scaled to its maximum. Auto Scaling does not perform health checks on instances in a standby state, and the health status reflects the status the instance had before it was put on standby, so AWS's own example is that a healthy instance put on standby and then terminated continues to be reported as healthy. Attempting to return a terminated standby instance to service makes Auto Scaling run a health check, determine that it is terminating and unhealthy, and launch a replacement. Instances in a standby state are billed. If the group becomes unbalanced across Availability Zones after an instance enters or exits standby, Auto Scaling rebalances unless the AZRebalance process is suspended. Detaching an instance is described as similar to putting it on standby, and is the option when you want to move it to another group or manage it as a standalone instance.

What happens at the load balancer

The deregistration is the part of standby that actually removes traffic, and it is not instant: “If there is a load balancer target group or Classic Load Balancer attached to your Auto Scaling group, the instance is deregistered from the load balancer. If connection draining is enabled for the load balancer, Elastic Load Balancing waits 300 seconds by default before completing the deregistration process, which helps in-flight requests to complete.”

Five minutes of default drain, in other words, before the instance is actually out of rotation. For a planned patch that is exactly right. For an urgent investigation into an instance that is misbehaving under load, it means standby does not stop the traffic as fast as you probably expect, and the drain timeout is a load balancer setting rather than an Auto Scaling one.

On the way back the registration happens, but nothing in the documented flow waits for the instance to pass a health check before Auto Scaling considers it InService — the health check on exit is the one described in challenge 1, which determines whether the instance is viable at all.

The four combinations

ActionDesired capacityWhat you end up with
Enter, decrementGoes down by oneOne instance parked, group at its new target
Enter, no decrementUnchangedParked instance plus a replacement, both billed
ExitGoes up by oneInstance back in service and registered
Exit, group at maximumCannot incrementOperation fails; instance stays in standby

The second row is the one that surprises people, and the fourth is the one that strands an instance. Both follow from the same design decision: desired capacity is the thing standby manipulates, and desired capacity is bounded.

Rebalancing can move underneath you

“If at anytime after putting an instance on standby, or returning the instance to service by exiting the standby state, your Auto Scaling group is found to not be balanced between Availability Zones, Amazon EC2 Auto Scaling compensates by rebalancing the Availability Zones unless you suspend the” AZRebalance process.

Taking one instance out of a three-zone group makes that group unbalanced by definition, so this is not an edge case — it is the normal consequence of using standby on a balanced group. And it connects straight to post #129: suspending AZRebalance is the documented way to stop it, which means a careful standby workflow on a multi-zone group involves two operations rather than one.

Worth remembering from that post what suspending AZRebalance does and does not do: it stops redistribution after events like this one, but a scale-out or scale-in still tries to balance zones on its own.

Standby against detach

“Detaching instances from an Auto Scaling group is similar to putting instances on standby.” The page puts them side by side, and the distinction is about what you intend to do next.

StandbyDetach
Still in the groupYesNo
Still billedYesYes — it is still an EC2 instance
Health checksStopped, status frozenNot applicable
Scale-in protectionRetainedLost, per post #127
Intended forPatch or debug, then returnMove to another group, or run standalone

The scale-in protection row is the one that decides it in practice. Post #127 found that detaching an instance loses its protection setting and reattaching inherits the group's. Standby does not do that, which makes standby the right tool whenever the instance is coming back.

The suspended-process equivalent

Post #129 noted that with Launch and Terminate suspended you can put an instance into standby but cannot return it to service. The reason is now obvious: exiting standby increments desired capacity and that is a Launch-side operation. Standby and suspended processes overlap, and the overlap is one-directional — the suspension lets you park instances and not retrieve them.

Why This Architecture Holds Up

Freezing the status is the only coherent option

The alternative is to keep running health checks on an instance you have deliberately taken out of service to reboot, which would mark it unhealthy for doing exactly what you asked it to do. Auto Scaling could report a third state — unknown — and arguably should, but the last-known value at least never claims to be current. The failure mode is in what reads it, not in what writes it.

Not decrementing by default protects the workload

The default is to keep capacity whole, which is the right choice for a feature whose stated purpose is maintenance on a running service. Someone patching one instance of twenty almost certainly wants the twenty to stay twenty. The cost of the extra instance is real and is the correct trade for not silently shrinking a production group.

Bounding the capacity change is right even when it strands an instance

An exit that could push desired capacity above the group's maximum would make the maximum advisory, and post #129 already found one way for a group to exceed it. Failing the operation keeps the maximum meaningful. It needs an alarm rather than a redesign, because a failed exit-standby is both silent and billed.

Key Architecture Decisions

DecisionTakeWhy
Reading instance health during an investigation Do not trust the group's health status It is frozen at whatever it was before standby
Parking an instance to debug it Decide the decrement deliberately Without it you run and pay for a replacement too
Groups near their maximum size Check headroom before entering standby exit-standby fails if it cannot increment
Urgently pulling traffic from an instance Expect the 300-second default drain Deregistration waits for connection draining
Multi-zone groups Suspend AZRebalance alongside Removing one instance unbalances the group by definition
Instance that is coming back Standby, not detach Detach loses scale-in protection; standby keeps it
Long investigations Put an expiry on them A standby instance is billed for as long as it sits there

The audit worth running

  • Every instance currently in Standby, and for how long. This is the standby equivalent of the never-resumed suspension from post #129, and it costs money the whole time.
  • Every group where the count of instances exceeds desired capacity, which is the signature of an instance entered into standby without the decrement.
  • Every monitoring query that reads HealthStatus from DescribeAutoScalingInstances without also checking LifecycleState — those are the ones reading a frozen value as a live one.
  • Every group at or near MaxSize with an instance in standby, where the return journey is already blocked.

Closing Thought

Eleven posts into Auto Scaling, and standby is the one feature in the set whose surprising behaviour is not really about Auto Scaling at all. Freezing the health status is the correct thing for the service to do. The problem is downstream: a status field that means the last check gets read as the current state, and nothing in the field name says which.

The finding I would act on is the pairing of that frozen status with the billing sentence. An instance parked for an investigation that nobody closed out keeps reporting the health it had on the day it was parked, keeps costing what it cost, and keeps its slot in the group. The only thing that distinguishes it from a working instance is LifecycleState, which is a field most health dashboards never read.

That is the whole Auto Scaling series in one sentence, and a reasonable place to leave it: the service tells you the truth in a field you have to know to ask for.

Comments

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