From the course: AWS Certified Advanced Networking - Specialty (ANS-C01) Cert Prep

Unlock this course with a free trial

Join today to access over 25,200 courses taught by industry experts.

Amazon EC2 Auto Scaling lifecycle hooks

Amazon EC2 Auto Scaling lifecycle hooks

- [Instructor] In this lecture, we'll talk about lifecycle hooks in Amazon EC2 auto-scaling, and the benefits of using them in your production workloads. First off, let's talk about what the hook is. A hook is simply a function that gets executed automatically on a certain event and provides stability to influence the outcome of your workflow based on the criteria that you define. This can stop, skip, or replace the other function that is supposed to run on a particular lifecycle. Lifecycle hooks can also be seen in some programming languages, version control, and other programs. For example, you can add a hook in your Git Hook configuration source control to run some tests before committing the code changes to your repo. This will prevent a problematic code to be committed to your repository by ensuring that your unit or integration tests were successfully run for each and every commit. If the test fail, then the…

Contents