Configure instance retention
Set up your Amazon EC2 Auto Scaling group to retain instances when termination lifecycle actions fail.
To use instance lifecycle policies in your Auto Scaling group, you must also configure a termination
lifecycle hook. If you configure an instance lifecycle policy but don't have any termination
lifecycle hooks, the policy has no effect. Instance lifecycle policies will only apply
when termination lifecycle actions are abandoned, not when they complete successfully with the
CONTINUE result.
Instance lifecycle policies use retention triggers to determine when to retain an instance.
The TerminateHookAbandon trigger causes retention in several scenarios:
-
When you explicitly call the CompleteLifecycleAction API with the
ABANDONresult. -
When a termination lifecycle action with default result
ABANDONtimes out because the heartbeat timeout is reached without receiving a heartbeat. -
When the global timeout is reached on a termination lifecycle action with default result
ABANDON, which is 48 hours or 100 times the heartbeat timeout, whichever is smaller