AWS Auto Scaling Lifecycle Hooks with the AWS CLI
Welcome to this hands-on lab, where you will learn how to manage the deployment of EC2 instances in an Auto Scaling Group using Lifecycle Hooks.
When deploying instances in an Auto Scaling Group, it is often desirable to bootstrap the instances with scripts that will deploy software onto the instance at creation time. But problems can arise if the instance spins up and comes to a ready state before software deployment has completed. In this hands-on lab, we will use Lifecycle Hooks to hold the EC2 instance in a pending:Wait state to ensure that a Bash script, which will be used to deploy web application software, has completed before allowing the EC2 instance to progress to the in-service state.