AWS Security ChangesHomeSearch

AWS autoscaling documentation change

Service: autoscaling · 2026-03-10 · Documentation medium

File: autoscaling/ec2/userguide/replace-root-volume.md

Summary

Added documentation for using lifecycle hooks with root volume replacement including pre/post replacement actions

Security assessment

The change documents operational best practices for data migration and validation during root volume replacement, which could help prevent data loss - but doesn't directly address security vulnerabilities or introduce new security features. The security relevance is indirect.

Diff

diff --git a/autoscaling/ec2/userguide/replace-root-volume.md b/autoscaling/ec2/userguide/replace-root-volume.md
index c87b057e3..6e706f7f3 100644
--- a//autoscaling/ec2/userguide/replace-root-volume.md
+++ b//autoscaling/ec2/userguide/replace-root-volume.md
@@ -5 +5 @@
-How it worksRequirementsStart an instance refresh with Replace Root VolumeLimitations
+How it worksRequirementsStart an instance refresh with Replace Root VolumeLimitationsUse lifecycle hooks with replace root volume
@@ -18,0 +19,2 @@ How it worksRequirementsStart an instance refresh with Replace Root VolumeLimita
+  * Use lifecycle hooks with replace root volume
+
@@ -139,0 +142,37 @@ Example output:
+## Use lifecycle hooks with replace root volume
+
+Instances undergoing root volume replacement follow their own lifecycle transitions, allowing you to invoke actions (for example, a Lambda function) before and/or after the replacement. For more information about lifecycle states during root volume replacement, see [Lifecycle state transitions for instances undergoing root volume replacement](./lifecycle-hooks-overview.html#rvr-lifecycle-state-transitions).
+
+For more information about adding a lifecycle hook, see [Add lifecycle hooks to your Auto Scaling group](./adding-lifecycle-hooks.html). For more information about completing a lifecycle action, see [Complete a lifecycle action in an Auto Scaling group](./completing-lifecycle-hooks.html).
+
+Before root volume replacement, a lifecycle hook can be useful in the following scenarios:
+
+  * You want to gracefully shut down your application before the root volume is replaced and the instance is rebooted.
+
+  * You want to move data from the root volume to another location before the volume is replaced.
+
+
+
+
+After root volume replacement, a lifecycle hook can be useful in the following scenarios:
+
+  * You want to verify that your instance is fully ready with the new AMI before it starts receiving traffic.
+
+  * You want to bootstrap application data that previously existed on the root volume.
+
+
+
+
+When you add lifecycle hooks, consider the following:
+
+  * When a lifecycle hook is configured for the `autoscaling:EC2_INSTANCE_TERMINATING` lifecycle action, an instance about to undergo root volume replacement pauses to perform a custom action when it reaches the `ReplacingRootVolume:Wait` state.
+
+  * When a lifecycle hook is configured for the `autoscaling:EC2_INSTANCE_LAUNCHING` lifecycle action, an instance that just had its root volume replaced pauses to perform a custom action when it reaches the `Pending:Wait` state.
+
+
+
+
+When instances reach a wait state, Amazon EC2 Auto Scaling sends a notification. Auto Scaling lifecycle hook notifications contain an `Action` field with value `ReplaceRootVolume` to indicate the instance is undergoing root volume replacement.
+
+Examples of these notifications are available in the EventBridge section of this guide. For more information see [Instance refresh replace root volume lifecycle events](./instance-refresh-eventbridge-events.html#instance-refresh-rvr-lifecycle-events).
+