Context
An Auto Scaling lifecycle hook pauses an instance transition while custom automation prepares or drains the workload. Pending:Wait can therefore be expected during bootstrap, while a prolonged wait may mean the completion path is broken. Investigate the hook's finite deadline and automation evidence before manually advancing an instance.
Establish the lifecycle action identity
Record the Auto Scaling group, instance ID, hook name, transition, action token, notification path, heartbeat timeout and default result. Keep tokens in the authorized automation context rather than general incident logs. Identify the component responsible for receiving the event and the one responsible for completing the action.
Use a test group with a representative launch template. Define the readiness or drain condition that makes CONTINUE appropriate. A script reaching its last line is not necessarily proof that the business application can safely enter service.
1. Trace event delivery to the worker
Compare the instance's lifecycle state and scaling activity timestamps with EventBridge or the configured notification target. Confirm that the automation selected the intended group, hook and transition. A broad rule can receive several hook types, and a handler may discard one because it expects another event shape.
Inspect automation failures and permissions before rerunning it. If a worker never received the event, changing its bootstrap script will not restore delivery. If it received the event but failed halfway through, determine which steps are safe to repeat.
2. Check heartbeat and completion behavior
Review whether heartbeats occur before the current timeout expires. Each heartbeat extends the wait according to the hook setting, but the wait is not unlimited. AWS documents a global maximum of forty-eight hours or one hundred heartbeat periods, whichever is smaller.
Check the exact completion request and result. The action must refer to the correct lifecycle identity. Inspect the configured default result as well: when automation times out or fails unexpectedly, that setting determines the next decision. Do not assume every launch hook fails closed.
3. Interpret the wait using evidence
| Evidence | Likely boundary | Next action |
|---|---|---|
| No handler invocation | Notification routing | Inspect event match and target permissions |
| Heartbeats continue with no progress | Automation stalled | Inspect current step and deadline |
| Completion request rejected | Action identity or permissions | Compare group, hook and token |
| Instance proceeds before readiness | Default or early completion | Review acceptance condition |
An explicitly illustrative scenario: a bootstrap worker downloads application configuration and sends heartbeats, but it waits forever for a package mirror that is unavailable. The launch hook eventually reaches its deadline. The team adds a bounded dependency check, explicit failure handling and a readiness verification before completion. It tests both mirror success and failure, rather than extending the timeout indefinitely.
Correct and verify the full transition
Apply the routing, permission or handler correction in the test group. Observe a new instance from launch through the wait state to the expected outcome. Confirm that CONTINUE corresponds to a ready application and that the failure path produces the approved replacement or escalation behavior.
For termination hooks, verify that draining is bounded and state is already durable; the hook does not create unlimited time or override unrelated infrastructure deadlines. Make repeated handler events harmless.
The SOP should record hook owners, timeout budgets, default results, heartbeat alarms and manual completion criteria. Monitor aged waits together with scaling activity and application capacity so the group does not appear healthy while useful capacity remains trapped in preparation.
Explore Clouvenix managed infrastructure for implementation and operational handover.
Technical reference
Lifecycle sequence, hook limits, default-result fields, and heartbeat configuration describe the wait contract.