Skill 4.1.4

Troubleshoot deployment failures by using output logs.

Key Concepts

CloudFormation stack events show which resource failed and why, and the first failure is usually the cause, since later events are rollbacks. CodeBuild writes build logs to CloudWatch Logs and S3, showing the phase and command that failed. CodeDeploy shows which lifecycle event failed on which instance, and on EC2 the agent's logs are in /opt/codedeploy-agent/deployment-root/ and /var/log/aws/codedeploy-agent/.

Elastic Beanstalk environment events and downloadable logs (request logs) show failed deployments and health changes, and CodePipeline shows which action failed, with a link to the underlying service's details. CloudTrail records the API calls made during the deployment, including permission failures.