Homeβ€Ί Blogβ€Ί AWS Architecture Series #127 β€” Enabling it on the group protects nothing already running…
AWS Architecture AWS Architecture Series

AWS Architecture Series #127 β€” Enabling it on the group protects nothing already running

Instance scale-in protection is the setting that exempted an instance from its maximum lifetime in the previous post, so it is worth knowing precisely what it covers. The answer is narrower than the name suggests and the controls are less connected than they look. The group-level setting is a launch-time default, not a fleet-wide switch: enabling or disabling it does not affect existing instances, so an operator who turns it on to protect a running fleet has protected nothing yet. The protection itself covers scale in and five documented things it does not cover - health check replacement, Spot interruptions, a Capacity Block reservation ending, manual termination through terminate-instance-in-auto-scaling-group, and manual termination from the EC2 console or API. EC2 termination protection covers the last of those and explicitly not the others. And when every instance is protected and a scale-in event arrives, desired capacity is decremented anyway, so the group's target and its actual size diverge. Activity history carries the reason; the divergence itself is visible in the GroupDesiredCapacity and GroupInServiceCapacity group metrics, which have to be enabled before they are reported.

Verified against current vendor documentation on 28 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 previous post found that a scale-in protected instance is exempt from its maximum instance lifetime, with no timeout and no escalation. That makes this setting load-bearing in a way its name does not suggest, and the obvious next question is what else it covers.

The documented answer is: scale in, and a short list of things that are not scale in. The use case AWS names is specific — “A common use case for this feature is scaling container-based workloads” — and the default is off: “By default, instance scale-in protection is disabled when you create an Auto Scaling group. This means that Amazon EC2 Auto Scaling can terminate any instance in the group.”

1The group setting is a default for new instances, not a switch for the fleet

“When you enable it, all new instances launched by the group will have instance scale-in protection enabled.” And then, as its own sentence:

“Enabling or disabling this setting for an Auto Scaling group does not affect existing instances.”

Those two sentences are the whole trap. An operator who turns the group setting on in order to stop a running instance being terminated has changed what happens to instances that do not exist yet. The console shows the group as having instance scale-in protection enabled, and every instance currently in service is still terminable.

The same applies in reverse. Turning the setting off does not unprotect anything already running, which is the version of this that produces a group nobody can scale in.

The per-instance control is a separate operation: “By default, an instance gets its instance scale-in protection setting from its Auto Scaling group. However, you can enable or disable instance scale-in protection for individual instances after they launch.” That is set-instance-protection, and it is the only thing that changes a running instance.

2Five terminations it does not stop

“Instance scale-in protection does not protect Auto Scaling instances from the following” — and the list is worth reading as a list, because each entry is a way a protected instance disappears.

Not protected fromWhat covers it instead
Health check replacementNothing — fix the health check
Spot Instance interruptionsNothing — capacity or price moved
A Capacity Block reservation endingNothing — EC2 reclaims the instances
terminate-instance-in-auto-scaling-groupNothing, explicitly
Manual termination via the EC2 console, CLI or APIEC2 termination protection

Two of those are worth quoting exactly. On Spot: “Spot Instance interruptions. A Spot Instance is terminated when capacity is no longer available or the Spot price exceeds your maximum price.” On Capacity Blocks: “A Capacity Block reservation ends. Amazon EC2 reclaims the Capacity Block instances even if they are protected from scale in.”

So the protection covers the terminations Auto Scaling chooses to make for capacity reasons. It does not cover the terminations anybody else makes, or the ones Auto Scaling makes for health.

3Desired capacity moves even when nothing can be terminated

“If all instances in an Auto Scaling group are protected from scale in, and a scale in event occurs, its desired capacity is decremented. However, the Auto Scaling group can't terminate the required number of instances until their instance scale in protection settings are disabled.”

The group now has a desired capacity below its actual capacity, and will stay that way until somebody unprotects an instance. Activity history is where the reason appears: “Could not scale to desired capacity because all remaining instances are protected from scale in.”

The divergence itself is measurable. Auto Scaling publishes GroupDesiredCapacity — “The number of instances that the Auto Scaling group attempts to maintain” — alongside GroupInServiceCapacity, the capacity units actually running, so the gap can be expressed with metric math and alarmed on. The catch is the reporting criterion both carry: “Reported if metrics collection is enabled”, and “Group metrics are available at one-minute granularity at no additional charge, but you must enable them.”

So a group without metrics collection enabled has only the activity-history entry, and the cost is real — you are running more instances than the group is now trying to run, indefinitely. A later scale-out from that decremented desired capacity also starts from the wrong number.

Architecture

Diagram: Amazon EC2 Auto Scaling instance scale-in protection. By default instance scale-in protection is disabled when you create an Auto Scaling group, which means Auto Scaling can terminate any instance in the group. The group-level setting and the per-instance setting are different things: enabling the group setting means all new instances launched by the group will have scale-in protection enabled, but enabling or disabling the setting for the group does not affect existing instances, so only set-instance-protection changes an instance that is already running. Protection begins when the instance state is InService. Instance scale-in protection does not protect instances from five documented cases: health check replacement if the instance fails health checks; Spot Instance interruptions, where a Spot Instance is terminated when capacity is no longer available or the Spot price exceeds the maximum price; a Capacity Block reservation ending, where Amazon EC2 reclaims the Capacity Block instances even if they are protected from scale in; manual termination through the terminate-instance-in-auto-scaling-group command; and manual termination through the Amazon EC2 console, CLI commands and API operations. Amazon EC2 termination protection covers only that last case, and does not prevent Auto Scaling from terminating instances or manual termination through terminate-instance-in-auto-scaling-group. If all instances in a group are protected from scale in and a scale-in event occurs, the group's desired capacity is decremented anyway but the group cannot terminate the required number of instances until protection settings are disabled, and activity history carries the reason as a message reading that it could not scale to desired capacity because all remaining instances are protected from scale in, while the divergence itself can be measured by comparing the GroupDesiredCapacity and GroupInServiceCapacity group metrics, both of which are reported only if metrics collection is enabled. Detaching a protected instance loses its protection setting, and reattaching it makes it inherit the group's current setting; a newly launched instance, or one moved from a warm pool into the group, also inherits the group setting. Even with both termination protection and scale-in protection enabled, data saved to instance storage can be lost if a health check determines that an instance is unhealthy or if the group itself is accidentally deleted.

Two settings, one name

The confusion this feature generates comes from the group property and the instance property sharing a name while doing different jobs. They are better read as a template and a value.

Group settingInstance setting
Set with--new-instances-protected-from-scale-inset-instance-protection
AffectsInstances launched from now onOne named instance, now
Affects running instancesNoYes
Survives a detachn/aNo — reattaching inherits the group's

The CLI flag name is the clearer of the two: --new-instances-protected-from-scale-in says exactly what it does, and the console label — Enable instance scale-in protection — does not.

When protection starts

“Instance scale-in protection starts when the instance state is” InService. That matters for the window before it: an instance in Pending, or sitting in a launch lifecycle hook, is not yet protected. For a group whose instances take a long time to initialize — the warm pool and lifecycle hook cases from posts #122 and #123 — that window is not short.

What inherits, and what forgets

“When Amazon EC2 Auto Scaling launches a new instance or moves an instance from a warm pool into the Auto Scaling group, the instance inherits the instance scale in protection setting of the Auto Scaling group.”

So a warm pool instance picks up the group's setting at the moment it joins the group, not at the moment it was created. A group whose setting changed while instances sat in the warm pool will see them arrive with the new setting.

Detaching is the one that loses information: “If you detach an instance that is protected from scale in, its instance scale in protection setting is lost. When you attach the instance to the group again, it inherits the current instance scale in protection setting of the group.”

A detach-and-reattach is therefore not a round trip. An instance individually protected, detached for investigation and put back, comes back with whatever the group's default is — which for most groups is unprotected.

Which control covers which termination

The two protections are frequently discussed together and they do not overlap. The documentation is unusually direct about it: “To protect Auto Scaling instances from manual termination, enable Amazon EC2 termination protection. (This does not prevent Amazon EC2 Auto Scaling from terminating instances or manual termination through the” terminate-instance-in-auto-scaling-group command.

Read as a matrix: scale-in protection stops Auto Scaling's capacity-driven terminations and nothing else. EC2 termination protection stops a human with the EC2 console and nothing else. Neither stops a health check replacement, a Spot interruption, a Capacity Block ending, or the Auto Scaling termination API. There is no setting that stops all of them, and that is the honest summary of this page.

The data the protections do not protect

The page closes with a note that is easy to skim and is the most consequential sentence on it: “even with termination protection and instance scale-in protection enabled, data saved to instance storage can be lost if a health check determines that an instance is unhealthy or if the group itself is accidentally deleted.”

Both protections are about the instance, and neither is about the data. If an instance holds state that matters, the protections are not the mechanism — the documented advice is to back it up. This is the same shape as the maintenance policy finding in post #125: a setting that reads like a durability guarantee and is scoped to one class of event.

Why This Architecture Holds Up

The group setting not affecting running instances is defensible

The alternative is a single API call that changes the terminability of every instance in a group at once, including instances somebody had deliberately unprotected. A launch-time default cannot do that, and the per-instance call is explicit about which instance it changes. The design is right; the console label is what makes it surprising.

A short list of exclusions beats a vague promise

Five named cases, each with a reason, is the most useful form this could take. A health check replacement is a correctness action rather than a capacity one; a Spot interruption and a Capacity Block ending are not Auto Scaling's decisions to make; and a human calling the termination API has said what they want. Each exclusion follows from who is making the decision, which is why the list is memorable rather than arbitrary.

Decrementing desired capacity anyway is the lesser evil

The alternative is a scale-in event that fails and leaves desired capacity where it was, which would make the group's target a function of whether protection happened to be set at that moment. Decrementing keeps the target meaning what the scaling policy asked for, and the shortfall is observable from two directions: activity history for the reason, and the group metrics for the gap. It is the right call and it needs the monitor wiring up, because an activity-history message is not an alarm and the metrics are not reported until somebody enables them.

Key Architecture Decisions

DecisionTakeWhy
Protecting an instance that is already running Use set-instance-protection The group setting does not touch existing instances
Protecting against a human with the EC2 console EC2 termination protection, separately Scale-in protection does not cover it
Relying on it for Spot or Capacity Block instances Do not Both reclaim protected instances by design
Instances holding state that matters Back it up; do not rely on either protection A health check replacement still loses instance storage
Detaching a protected instance Re-apply protection after reattaching The setting is lost on detach and inherited on attach
Groups where everything may end up protected Enable group metrics and alarm on desired versus in-service Desired capacity decrements with nothing else reporting it
Maximum instance lifetime as a compliance control Audit this setting against it Protection exempts an instance from the lifetime entirely

The audit worth running

  • Every group whose scale-in protection setting was changed, against the launch times of its current instances — anything older than the change has the old behaviour.
  • Every individually protected instance, for whether anybody still remembers why. There is no expiry on this setting and no owner recorded on it.
  • Every group that has ever logged the all-protected message, for a desired capacity that is still below its actual size — and every such group for whether group metrics collection is on at all, since without it the gap is not being measured.
  • Every protected instance in a group with a maximum instance lifetime, which is the intersection post #126 identified.

Closing Thought

Eight posts into Auto Scaling, this is the one whose behaviour is most completely described by its name, once you read the name carefully. It protects against scale in. Everything surprising about it follows from people reading it as protection against termination, which is a much larger claim.

The finding I would act on is the group setting. It is the only one here that fails silently in the direction of less safety: you make a change intending to protect a running fleet, the group reports the setting as enabled, and nothing you were trying to protect is protected. Every other behaviour on the page announces itself eventually — an instance disappears, or activity history says the group could not scale. That one just quietly does not apply.

Official AWS Reference

Comments

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