Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save eMahtab/84dbd724c7a92619bfd3d6556e224380 to your computer and use it in GitHub Desktop.
Save eMahtab/84dbd724c7a92619bfd3d6556e224380 to your computer and use it in GitHub Desktop.
How to create and complete a lifecycle hook
aws autoscaling put-lifecycle-hook \
--lifecycle-hook-name scale-out-hook \
--auto-scaling-group-name MyASG \
--lifecycle-transition autoscaling:EC2_INSTANCE_LAUNCHING
aws autoscaling complete-lifecycle-action \
--lifecycle-action-result CONTINUE \
--instance-id i-0680775fb68bc97a5 \
--lifecycle-hook-name scale-out-hook \
--auto-scaling-group-name MyASG
aws autoscaling complete-lifecycle-action \
--lifecycle-action-result ABANDON \
--instance-id i-033f4289b461aae75 \
--lifecycle-hook-name scale-out-hook \
--auto-scaling-group-name MyASG
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment