Business Challenge
Suspending processes is the escape hatch for every situation the previous nine posts described. A refresh you want to stop, a health check replacing instances while you debug them, a scaling policy fighting your investigation. AWS frames it exactly that way: “It also helps prevent Amazon EC2 Auto Scaling from marking instances unhealthy and replacing them while you are making changes to your Auto Scaling group.”
There are nine processes, and the list reads like nine independent switches. The page that matters is the one describing what each suspension does to the others, because two of them produce a group that cannot look after itself and one leaves damage that resuming does not repair.
“AZRebalance is still active but does not function properly. It can launch
new instances without terminating the old ones. This could cause your Auto Scaling group to grow
up to 10 percent larger than its maximum size, because this is allowed temporarily during
rebalancing activities. Your Auto Scaling group could remain above its maximum size until
you resume the” Terminate process.
Rebalancing is a launch followed by a terminate. Suspend the second half and the first half keeps
running, so the mechanism that exists to keep zones even becomes a mechanism that only adds. The
10 percent overshoot is a deliberate allowance for rebalancing — the same one from post
#125 — and it is designed to be temporary. With Terminate suspended it is not
temporary.
Worth being precise about what this means: MaxSize is not an invariant Auto Scaling
enforces under all conditions. It is a target that one suspension can put the group above, and
the group will sit there until somebody notices.
“Amazon EC2 Auto Scaling launches the instances but does not add them to the load
balancer target group or Classic Load Balancer. When you resume the”
AddToLoadBalancer process, it resumes adding instances as they are launched.
“However, it does not add the instances that were launched while this process
was suspended. You must register those instances manually.”
Several other suspensions have some form of recovery on resume, each specific to the process.
This one has none. The result is a set of instances that are InService, passing
health checks, counted toward desired capacity and receiving no traffic.
Nothing surfaces it on its own. Capacity looks correct, the instances look healthy, and the
load balancer is serving from a smaller pool than the group thinks it has — but it is
straightforwardly detectable once you look, by diffing the group's instance IDs from
DescribeAutoScalingGroups against the registered targets from
DescribeTargetHealth. If the suspension
overlapped a scale-out, the capacity you added during a traffic peak is the capacity that is not
taking traffic.
“ReplaceUnhealthy continues to terminate unhealthy instances, but does not
launch replacements. When you resume the” Launch process,
“Amazon EC2 Auto Scaling immediately replaces any instances that it terminated during
the time that Launch was suspended.”
So Launch suspended is a one-way ratchet. Health checks keep condemning instances,
ReplaceUnhealthy keeps terminating them, and nothing refills the group. A suspension
taken to stop Auto Scaling interfering with an investigation is also a suspension that lets the
fleet drain while the investigation runs.
The Spot case is worse and documented separately: a Spot Instance can still be interrupted while
Terminate is suspended, and
while Launch is suspended Auto Scaling cannot launch replacements from another Spot
pool or from the same pool when it becomes available again. The group loses instances to a
mechanism the suspension does not cover and cannot replace them.
Architecture
The nine processes
| Process | What it does when active |
|---|---|
Launch | Adds instances on scale out, and for other reasons such as filling a warm pool |
Terminate | Removes instances on scale in, and for a maximum lifetime or a failed health check |
AddToLoadBalancer | Registers launched instances with the target group or Classic Load Balancer |
AlarmNotification | Accepts CloudWatch alarm notifications for dynamic scaling policies |
AZRebalance | Evens instances across zones when the group becomes unbalanced |
HealthCheck | Marks instances unhealthy on EC2 or ELB signal |
InstanceRefresh | Terminates and replaces instances for an instance refresh |
ReplaceUnhealthy | Terminates unhealthy instances and creates replacements |
ScheduledActions | Runs scheduled scaling actions, including predictive scaling plans |
Note what HealthCheck also does:
“This process can override the health status of an instance that you set manually.”
That is the reason to suspend it before marking an instance unhealthy by hand — otherwise the
process can put your manual verdict back.
Launch and Terminate are the two that matter
Seven of the nine are leaves. Launch and Terminate are the primitives
everything else is built from, so suspending either reaches into five other processes.
With Launch suspended | With Terminate suspended |
|---|---|
| Alarms still fire; no scale out happens | Alarms still fire; no scale in happens |
| Scheduled actions run; no scale out happens | Scheduled actions run; no scale in happens |
AZRebalance stops rebalancing | AZRebalance runs and only launches |
ReplaceUnhealthy terminates, never replaces | ReplaceUnhealthy inactive, HealthCheck still marking |
| An instance refresh does not replace instances | An instance refresh does not replace instances |
The asymmetry in the third row is the finding from challenge 1. Rebalancing is
“It first calls Launch and then Terminate
”, and ReplaceUnhealthy is the opposite order —
“The ReplaceUnhealthy process calls Terminate first and then
Launch.” Suspending one primitive therefore truncates each composite process
at a different point: rebalancing keeps its growth half, replacement keeps its shrink half.
Two halves of the health loop
HealthCheck and ReplaceUnhealthy are deliberately separate, and the split
is useful once you see it. Suspend HealthCheck:
“Amazon EC2 Auto Scaling stops marking instances unhealthy as a result of EC2 and Elastic
Load Balancing health checks. Your custom health checks continue to function properly.”
Suspend ReplaceUnhealthy instead:
“Amazon EC2 Auto Scaling stops replacing instances that are marked as unhealthy. Instances
that fail EC2 or Elastic Load Balancing health checks are still marked as unhealthy.”
So you can keep the diagnosis and stop the action, or stop the diagnosis and keep the action
available for your own verdicts. The documented pattern for an investigation is the second of those:
suspending HealthCheck while leaving ReplaceUnhealthy active stops
automatic health classification from EC2 and Elastic Load Balancing, while still allowing
replacement driven by a health status you assign manually or by your own custom health checks.
Resuming is process-specific, not a single replay
Resuming is not one behaviour. Each process has its own documented recovery, and they differ in kind — some act on what accumulated, one evaluates the present, one discards what it missed, and one does nothing at all. This is the property most likely to catch somebody out, because the suspension is the deliberate act and the resume feels like simply undoing it.
| On resuming | What that process does |
|---|---|
Launch | Every instance terminated during the suspension is replaced |
Terminate | ReplaceUnhealthy starts and every instance marked unhealthy is replaced |
ReplaceUnhealthy | Every instance marked unhealthy during the suspension is replaced |
AlarmNotification | Policies whose thresholds are currently in breach are considered |
AZRebalance | Rebalancing is attempted, Launch first then Terminate |
ScheduledActions | Only actions whose time has not passed — missed ones are lost |
AddToLoadBalancer | Nothing — the gap is permanent |
The last two rows are the interesting ones, and they are opposites.
ScheduledActions discards what it missed:
“When you resume ScheduledActions, Amazon EC2 Auto Scaling only considers scheduled actions
whose scheduled time has not yet passed.” AlarmNotification does not discard
so much as re-evaluate — it looks at what is in breach now, not what was in breach then, which
is the right behaviour for an alarm. It is not free, though: a suspension that spanned a spike which
has since resolved means the scale-out never happened, so the group ran under-capacity for the
duration, and resuming does not go back and add that capacity.
What else stops working
The additional considerations are short and each one is a feature from an earlier post in this series going quiet:
-
“When
LaunchorTerminateare suspended, the maximum instance lifetime feature can't replace any instances.” The compliance control from post #126, silently not running. - An instance refresh is paused rather than cancelled: “If there is an instance refresh in progress, this pauses the operation without canceling it.” Good behaviour, and it interacts with the 14-day active-replacement ceiling from post #124.
-
Attach and detach become asymmetric: you can detach while both are suspended, but
“while
Launchis suspended, you can't attach new instances to the group.” -
“When
LaunchandTerminateare suspended, you can put an instance in the”Standbystate, but not return it to service whileLaunchis suspended. An instance parked inStandbyduring a suspension is parked until you resume. -
“Warm pools are not affected when
AZRebalanceis suspended.” The one explicit statement that a suspension does not reach somewhere.
AWS can suspend your processes for you
“In addition to suspensions that you initiate, Amazon EC2 Auto Scaling can also suspend processes for Auto Scaling groups that repeatedly fail to launch instances. This is known as an” administrative suspension.
With a documented trigger: “An administrative suspension most commonly applies to Auto Scaling groups that have been trying to launch instances for over 24 hours but have not succeeded in launching any instances.”
Note the wording: “most commonly applies” describes the usual circumstance, not a guaranteed cutoff. AWS does not commit to suspending at 24 hours, so this is something to recognise rather than a timer to design against.
It is worth knowing about before you meet it, because its symptom is a group that has stopped trying.
A launch template pointing at a deregistered AMI, a subnet with no addresses, a service quota reached
— after a sustained run of failures Auto Scaling may stop, and the group then looks idle rather
than broken. Suspended processes and the reason for each are returned by
DescribeAutoScalingGroups, which is where to confirm it. The processes can be resumed
like any other, but resuming without fixing the launch failure restarts the same loop.
Why This Architecture Holds Up
Composite processes truncating rather than failing is the right default
When Terminate is suspended, AZRebalance could refuse to run at all.
Letting it run its launch half means a zone that recovers still gets capacity, which is the
availability-preserving half of the operation. The cost is the overshoot, and AWS documents both the
bound and its persistence rather than presenting the suspension as side-effect free.
Splitting HealthCheck from ReplaceUnhealthy earns its complexity
One combined process would make the useful investigation pattern impossible. Being able to stop Auto Scaling forming its own opinion while keeping its ability to act on yours is exactly what you want when debugging a fleet, and it only works because the diagnosis and the action are separately suspendable.
Alarms re-evaluating and scheduled actions expiring is correct in both directions
An alarm describes a present condition, so replaying a resolved breach would be wrong. A scheduled action describes a moment, so running it late would also be wrong. The two processes behave oppositely on resume because the things they represent are different, not because of an inconsistency.
Key Architecture Decisions
| Decision | Take | Why |
|---|---|---|
Suspending Terminate |
Suspend AZRebalance with it |
Otherwise rebalancing only launches, past MaxSize |
Suspending AddToLoadBalancer |
Record the time, and register launches manually afterwards | It is the only suspension with no catch-up on resume |
Suspending Launch on a group under load |
Suspend ReplaceUnhealthy too |
Otherwise the group drains and cannot refill |
| Investigating a fleet by hand | Suspend HealthCheck, keep ReplaceUnhealthy |
HealthCheck can override a health status you set |
| Resuming after a long suspension | Expect a burst, and resume during a quiet window | Each process recovers differently, and three of them replace instances |
| Suspensions that span a scheduled action | Re-create it, or accept the miss | Actions whose time has passed are not run on resume |
| A group that has gone quiet | Check for an administrative suspension | Over 24 hours of failed launches is its most common circumstance |
| Spot groups | Do not suspend Launch for long |
Interruptions continue and replacements cannot launch |
The audit worth running
- Every group with any suspended process right now, and for how long — a suspension taken during an incident and never resumed is the common case.
-
Every group whose current size exceeds its
MaxSize, which withTerminatesuspended is a documented and persistent state. -
Every target group's healthy host count against its Auto Scaling group's in-service count —
a gap is what an
AddToLoadBalancersuspension leaves behind. -
Every group with a maximum instance lifetime and a suspended
LaunchorTerminate, where the compliance control is configured and not running.
Closing Thought
Ten posts on Auto Scaling, and this is the one that reads back across all of them. Every feature in
the series — health checks, lifecycle hooks, warm pools, instance refresh, maintenance
policies, maximum lifetime, scale-in protection, termination policies — is implemented on top
of Launch and Terminate, and suspending either one changes what the others
do without changing what they report.
The finding I would act on is the load balancer one, not the maximum-size one. A group above
MaxSize is visible in the console the moment you look, and it costs money rather than
availability. Instances that are in service, healthy and unregistered are not surfaced by anything
that watches the group itself, and they persist after the suspension ends. They are perfectly
detectable — diff the group's instance IDs against the load balancer's registered targets, and
read the suspended processes and their reasons from DescribeAutoScalingGroups —
but that is a check somebody has to decide to run.
That is the pattern this series has found ten times now: the behaviour is documented, the consequence is documented, and nothing volunteers that it happened — the evidence is there in the APIs for whoever thinks to ask.
Official AWS Reference
- How suspended processes affect other processes — the per-process cross-effects, that a suspended
TerminateleavesAZRebalancelaunching without terminating and can hold the group above its maximum size, that a suspendedLaunchleavesReplaceUnhealthyterminating without replacing, thatAddToLoadBalancerdoes not register instances launched during its suspension and they must be registered manually, the immediate replacement bursts on resumingLaunch,TerminateandReplaceUnhealthy, the call order ofAZRebalanceandReplaceUnhealthy, thatAlarmNotificationre-evaluates current breaches whileScheduledActionsdiscards passed ones, that an instance refresh pauses without cancelling, that warm pools are unaffected by anAZRebalancesuspension, and the additional considerations covering maximum instance lifetime, Spot interruptions, Capacity Rebalancing, attach and detach, andStandby - Suspend and resume Amazon EC2 Auto Scaling processes — the nine suspendable processes and what each does, that suspending helps prevent Auto Scaling marking instances unhealthy while you change the group, that
HealthCheckcan override a health status you set manually, and administrative suspension with its over-24-hours-of-failed-launches trigger - Considerations for suspending and resuming processes — further reading on when to reach for a suspension; no claims in this post are drawn from it
- Health checks for instances in an Auto Scaling group — further reading on the checks
HealthCheckandReplaceUnhealthysplit between them; no claims in this post are drawn from it
Comments