Posted On: Feb 24, 2016

Auto Scaling now emits an event using HAQM CloudWatch Events when an HAQM Elastic Compute Cloud (EC2) instance is ready to execute a launch or termination lifecycle hook.

Lifecycle hooks allow you to perform customized actions on your HAQM EC2 instances during scale out (instance launch) or scale in (instance termination). For example, you might download and install software when an instance is launching, and archive instance log files in HAQM Simple Storage Service (S3) when an instance is terminating. Now, in addition to publishing lifecycle hook notifications via HAQM Simple Queue Service (SQS) and HAQM Simple Notification Service (SNS), Auto Scaling publishes events to HAQM CloudWatch Events. Using CloudWatch Events, you can easily associate lifecycle hook events with automated responses, such as invoking an AWS Lambda function. This simplifies the process considerably, because you no longer have to manage compute resources or write code to poll an HAQM SQS queue or subscribe to an HAQM SNS topic.

There is no charge for using Auto Scaling, nor HAQM CloudWatch Events; you pay only for the underlying instances provisioned and the AWS Lambda functions invoked. To get started, call PutLifecycleHook using our API. To learn more about this feature, visit the Auto Scaling documentation.