AWS Auto Scaling Lifecycle Hooks
Welcome to this hands-on AWS Learning Activity in which 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 desired 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. When an instance spins up its lifecycle progresses through a lifecycle until it reaches an inservice state. In this Learning Activity 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 inservice state.