Open
Description
AutoScalingGroup#addLifecycleHook
inserts a LifeCycleHook-resrouce in the CFN-template that depends on the referenced ASG. This will result in the hook being created after the initial ASG (and its instances) have been created. Therefore, the hooks are not triggered for these initial instances.
CFN allows the use of LifecycleHookSpecificationList in the ASG specification. These hooks will also fire for the instances in the initial group.
Use Case
I would like my hooks to be triggered for all instances in my ASG, not only after a scaling event.
Proposed Solution
Extend interface AutoScalingGroupProps
with property lifecycleHookSpecificationList
and render according specifications.
There are two "reasonable" workarounds:
- Use the Cfn-classes
- Deploy first with
desiredCapacity = 0
, and then again with the desireddesiredCapacity
.
- 👋 I may be able to implement this feature request
-
⚠️ This feature might incur a breaking change
This is a 🚀 Feature Request