Lifecycle event hook availability
The following table lists the lifecycle event hooks available for each deployment and rollback scenario.
Lifecycle event name | Auto Scaling launch deployment¹ | Auto Scaling termination deployment¹ | In-place deployment² | Blue/green deployment: Original instances | Blue/green deployment: Replacement instances | Blue/green deployment rollback: Original instances | Blue/green deployment rollback: Replacement instances |
---|---|---|---|---|---|---|---|
ApplicationStop | ✓ | ✓ | ✓ | ✓ | |||
DownloadBundle³ | ✓ | ✓ | ✓ | ||||
BeforeInstall | ✓ | ✓ | ✓ | ||||
Install³ | ✓ | ✓ | ✓ | ||||
AfterInstall | ✓ | ✓ | ✓ | ||||
ApplicationStart | ✓ | ✓ | ✓ | ||||
ValidateService | ✓ | ✓ | ✓ | ||||
BeforeBlockTraffic | ✓ | ✓ | ✓ | ✓ | |||
BlockTraffic³ | ✓ | ✓ | ✓ | ✓ | |||
AfterBlockTraffic | ✓ | ✓ | ✓ | ✓ | |||
BeforeAllowTraffic | ✓ | ✓ | ✓ | ✓ | |||
AllowTraffic³ | ✓ | ✓ | ✓ | ✓ | |||
AfterAllowTraffic | ✓ | ✓ | ✓ | ✓ | |||
¹ For information about Amazon EC2 Auto Scaling deployments, see How Amazon EC2 Auto Scaling works with CodeDeploy. |
Run order of hooks in a deployment
Auto Scaling launch deployments
During an Auto Scaling launch deployment, CodeDeploy runs event hooks in the following order.
For more information about Auto Scaling launch deployments, see How Amazon EC2 Auto Scaling works with CodeDeploy.
