Skip to main content

AWS Auto Scaling Lifecycle Hooks

Hands-On Lab

 

Photo of

Training Architect

Length

01:00:00

Difficulty

Intermediate

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.

What are Hands-On Labs?

Hands-On Labs are scenario-based learning environments where learners can practice without consequences. Don't compromise a system or waste money on expensive downloads. Practice real-world skills without the real-world risk, no assembly required.