Posted On: Dec 11, 2023
CodeDeploy can now call your application’s stop hook during ASG scale-ins so that you can complete ongoing tasks, release application resources, or close outgoing connections. Your application’s stop hooks can also be invoked during ASG instance refresh operations, allowing you to patch your instances without impacting your application’s availability.
AWS CodeDeploy is a fully-managed deployment service that automates software deployments to Amazon EC2, AWS ECS, and AWS Lambda. Before, CodeDeploy only executed your stop application lifecycle hook during a Blue/Green deployment. Utilizing ASG's lifecycle termination hooks, CodeDeploy will now pause instance termination and executes your application's stop hook for any ASG instance termination event.
Support for ASG application termination hooks is available in all AWS Regions where AWS CodeDeploy is available.
To learn more, see Integration with Amazon EC2 Auto Scaling in the AWS CodeDeploy Developer Guide.