CodeDeploy lifecycle event hook
A named point in a CodeDeploy deployment, such as ApplicationStop or ValidateService, where your own script or function runs and can fail the deployment.
In more detail
On EC2 the hooks run scripts on each instance in a fixed order around stopping, installing and starting the application. On ECS and Lambda the hooks are functions, such as BeforeAllowTraffic for a smoke test before customers are shifted. A hook that fails or times out fails the deployment, which can trigger rollback.
Related terms
- AWS CodeDeploy — The AWS service that rolls a new application revision out to EC2 instances, ECS services or Lambda functions, and can roll it back automatically.
- AppSpec file — The file in a CodeDeploy revision that says what to install and which script or function to run at each lifecycle event.
Taught in
- CodeDeploy: Hooks That Never Ran — AWS Certified DevOps Engineer – Professional (DOP-C02) Exam Prep
- Troubleshooting Failed Deployments: Read The First Failure — AWS Certified DevOps Engineer – Professional (DOP-C02) Exam Prep