A team uses AWS CodeDeploy with a deployment configuration of CodeDeployDefault.OneAtATime to deploy a web application to an Auto Scaling group. Instances are behind an Application Load Balancer. The deployment fails with 'The overall deployment failed because too many individual instances failed deployment.' What is the most likely cause?
Trap 1: The target group deregistration delay is too long.
Incorrect. Deregistration delay affects how long in-flight requests are served, but it does not cause instances to fail the deployment health check.
Trap 2: The CodeDeploy agent is not installed on the instances.
Incorrect. If the agent were missing, the first instance would fail immediately, not 'too many individual instances' over time.
Trap 3: The deployment group is configured to skip the ELB health check.
Incorrect. Skipping the ELB health check would prevent health check failures from impacting the deployment, so this would not cause the error.
- A
The health check grace period on the Auto Scaling group is too short.
Correct. A short grace period causes instances to be considered unhealthy before the deployment finishes, triggering Auto Scaling to replace them and causing repeated failures.
- B
The target group deregistration delay is too long.
Why wrong: Incorrect. Deregistration delay affects how long in-flight requests are served, but it does not cause instances to fail the deployment health check.
- C
The CodeDeploy agent is not installed on the instances.
Why wrong: Incorrect. If the agent were missing, the first instance would fail immediately, not 'too many individual instances' over time.
- D
The deployment group is configured to skip the ELB health check.
Why wrong: Incorrect. Skipping the ELB health check would prevent health check failures from impacting the deployment, so this would not cause the error.