AWS Security ChangesHomeSearch

AWS autoscaling documentation change

Service: autoscaling · 2026-01-10 · Documentation low

File: autoscaling/ec2/userguide/manage-retained-instances.md

Summary

Added detailed documentation about instance lifecycle states during retention scenarios, expanded CloudWatch metrics for monitoring retained instances, and clarified termination procedures.

Security assessment

The changes focus on operational aspects of retained instances (lifecycle states, monitoring metrics, termination procedures) without addressing vulnerabilities or security weaknesses. No security patches, vulnerability disclosures, or access control changes are mentioned.

Diff

diff --git a/autoscaling/ec2/userguide/manage-retained-instances.md b/autoscaling/ec2/userguide/manage-retained-instances.md
index d645668dc..9b25b3c57 100644
--- a//autoscaling/ec2/userguide/manage-retained-instances.md
+++ b//autoscaling/ec2/userguide/manage-retained-instances.md
@@ -5 +5 @@
-Monitor retained instancesTerminate retained instances
+Instance lifecycle states of retained instancesMonitor retained instancesTerminate retained instances
@@ -9 +9 @@ Monitor retained instancesTerminate retained instances
-Monitor and control instances that have been moved to Retained state. Use scaling activities and metrics to track retention events, then manually terminate instances after completing your custom actions.
+Monitor and control Amazon EC2 instances that have been moved to a retained state. Use CloudWatch metrics to track retained instances, then manually terminate retained instances after completing your custom actions. 
@@ -11 +11 @@ Monitor and control instances that have been moved to Retained state. Use scalin
-## Monitor retained instances
+Retained instances do not count toward your Amazon EC2 Auto Scaling group's desired capacity. When an instance enters a retained state, Auto Scaling launches a replacement instance to maintain the desired capacity. For example, suppose your Auto Scaling group has a desired capacity of 10. When an instance enters the `Terminating:Retained` state, Auto Scaling launches a replacement instance to maintain the desired capacity of 10. You now have 11 running instances in total: 10 in your active group plus 1 retained instance. Standard Amazon EC2 charges for all 11 instances will apply until you manually terminate the retained instance. 
@@ -13 +13 @@ Monitor and control instances that have been moved to Retained state. Use scalin
-Check scaling activities for retention events:
+## Instance lifecycle states of retained instances
@@ -14,0 +15,26 @@ Check scaling activities for retention events:
+Understand how instances transition through lifecycle states when instance lifecycle policies are used. Instances follow a specific path from normal termination through retention to final termination. 
+
+_When retention is triggered, instances transition through these states:_
+
+  1. `Terminating` \- Normal termination begins
+
+  2. `Terminating:Wait` \- Lifecycle hook executes
+
+  3. `Terminating:Proceed` \- Lifecycle actions wrap up (whether they succeeded or failed)
+
+  4. `Terminating:Retained` \- Hook fails, instance retained for manual intervention
+
+
+
+
+Warm pool instances take different lifecycle state paths depending on the scenario:
+
+_Instances scaling back into the warm pool:_
+
+  1. `Warmed:Pending` \- Normal warm pool transition begins
+
+  2. `Warmed:Pending:Wait` \- Lifecycle hook executes
+
+  3. `Warmed:Pending:Proceed` \- Lifecycle actions wrap up (whether they succeeded or failed)
+
+  4. `Warmed:Pending:Retained` \- Hook fails, instance retained for manual intervention
@@ -16,2 +41,0 @@ Check scaling activities for retention events:
-    aws autoscaling describe-scaling-activities \
-    --auto-scaling-group-name my-asg
@@ -19 +43,18 @@ Check scaling activities for retention events:
-Look for termination activities with `StatusCode: Cancelled` and status messages indicating lifecycle hook failures.
+
+
+_Instances being terminated from the warm pool:_
+
+  1. `Warmed:Terminating` \- Normal termination begins
+
+  2. `Warmed:Terminating:Wait` \- Lifecycle hook executes
+
+  3. `Warmed:Terminating:Proceed` \- Lifecycle actions wrap up (whether they succeeded or failed)
+
+  4. `Warmed:Terminating:Retained` \- Hook fails, instance retained for manual intervention
+
+
+
+
+## Monitor retained instances
+
+Because retained Amazon EC2 instances incur costs and require manual intervention, monitoring them is essential. Amazon EC2 Auto Scaling provides several CloudWatch metrics to track retained instances. 
@@ -30 +71,3 @@ The available metrics are:
-  * `GroupTerminatingRetainedInstances`
+  * `GroupTerminatingRetainedInstances` shows the number of instances in the `Terminating:Retained` state. 
+
+  * `GroupTerminatingRetainedCapacity` shows the capacity units represented by instances in the `Terminating:Retained` state. 
@@ -32 +75 @@ The available metrics are:
-  * `GroupTerminatingRetainedCapacity`
+  * `WarmPoolTerminatingRetainedCapacity` tracks retained instances terminating from the warm pool. 
@@ -34 +77 @@ The available metrics are:
-  * `WarmPoolTerminatingRetainedCapacity`
+  * `WarmPoolPendingRetainedCapacity` tracks retained instances returning to the warm pool. 
@@ -36 +78,0 @@ The available metrics are:
-  * `WarmPoolPendingRetainedCapacity`
@@ -39,0 +82,5 @@ The available metrics are:
+You can also check your Amazon EC2 Auto Scaling group's scaling activities to understand why instances were retained. Look for termination activities with `StatusCode: Cancelled` and status reason messages indicating lifecycle hook failures: 
+    
+    
+    aws autoscaling describe-scaling-activities \
+    --auto-scaling-group-name my-asg
@@ -41 +88 @@ The available metrics are:
-We recommend enabling these metrics and setting up CloudWatch alarms to monitor retained instances. This helps you track cost implications and alerts you when instances are in this exceptional state requiring manual intervention. 
+We recommend creating CloudWatch alarms on these metrics to alert you when instances enter a retained state. This helps you track cost implications and ensures you don't forget to clean up instances that require manual intervention. 
@@ -45 +92 @@ We recommend enabling these metrics and setting up CloudWatch alarms to monitor
-After completing your custom actions, terminate retained instances:
+After completing your custom actions, terminate your retained instances by calling the [ TerminateInstanceInAutoScalingGroup ](https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_TerminateInstanceInAutoScalingGroup.html) API: 
@@ -60 +107 @@ Configure instance retention
-Instance lifecycle states
+Retrieve the target lifecycle state