I have a cdk project with an autoscaling group and lifecycle hooks. The lifecycle hooks trigger a lambda via an Event Rule.
When I deploy, the following happens:
- The ASG gets created => And immidatly starts an instance without lifecycle hooks.
- The Lifecycle hooks get created (they depend on the ASG).
This means the first instance is created without lifecycle hooks! That is not acceptable, I may not have running instances that never got "made ready" by the lifecycle hook.
Is there a fix for this?