Skip to content

Instantly share code, notes, and snippets.

@mikepfeiffer
Created August 27, 2016 19:30
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 7 You must be signed in to fork a gist
  • Save mikepfeiffer/4aea8cba143ff31fa90a33ff4818b809 to your computer and use it in GitHub Desktop.
Save mikepfeiffer/4aea8cba143ff31fa90a33ff4818b809 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