Skill 1.4.3
Troubleshooting deployment issues
Key Concepts
CodeDeploy shows each lifecycle event per instance; the failed hook and its script output point to the cause, such as a script error, a timeout, a missing file in the appspec, or ApplicationStop failing because the previous revision's script was broken (fix with --ignore-application-stop-failures). Health check failures in blue/green deployments keep traffic on the original environment.
For ECS, check service events and stopped task reasons; the deployment circuit breaker rolls back repeated failures. For Lambda, check the alias traffic shift and the BeforeAllowTraffic hook results. For CloudFormation, read stack events from the first failure. Automatic rollback on CloudWatch alarms limits user impact while the cause is investigated.