A company uses AWS CodePipeline with a multi-branch strategy. A new feature branch triggers a pipeline that runs unit tests and deploys to a test environment. The deployment step uses AWS CodeDeploy with a deployment group configured for in-place deployment to Amazon EC2 instances. The deployment fails intermittently with the error 'The overall deployment failed because too many individual instances failed deployment, too few healthy instances are available for deployment, or some instances in your deployment group are experiencing problems.' The instances are healthy and pass health checks. What is the most likely cause?
Trap 1: The pipeline has a failed execution that is blocking subsequent…
CodePipeline executions are fully concurrent by design; a failed execution does not place a lock or mutex on the pipeline or its stage. Although you can retry a failed action, the presence of a failed run never prevents a new execution triggered by a new commit from proceeding. In a multi-branch setup, each branch maintains its own independent execution history, so a failure in one branch has no blocking effect on another branch's pipeline run.
Trap 2: The pipeline is configured with a high frequency of changes,…
CodePipeline throttling is an API-level rate limit (for example, ThrottlingException on GetPipelineExecution or PutJobSuccessResult), not a deployment-group capacity limit. Even with a high frequency of branch commits, pipelines are designed to handle continuous delivery, and throttling would be rare and would surface as intermittent API errors, not as a persistent inability to start a deployment. A throttling error would affect the pipeline's ability to invoke or poll actions, but it would not be described as a deployment being blocked by an existing deployment.
Trap 3: A previous deployment is still in progress or frozen in the…
CodeDeploy enforces a concurrency limit of one in-progress deployment per deployment group by default. If a previous deployment is still running, stopped mid-lifecycle, or frozen (for example, pending a rollback or waiting on a manual approval), the service refuses to start a new deployment and returns an error indicating that a deployment is already in progress. With a multi-branch strategy, two pipelines can try to deploy to the same group nearly simultaneously; the second pipeline's Deploy action will wait or fail because the deployment group is not available, not because of the pipeline itself.
- A
The pipeline has a failed execution that is blocking subsequent executions.
Why wrong: CodePipeline executions are fully concurrent by design; a failed execution does not place a lock or mutex on the pipeline or its stage. Although you can retry a failed action, the presence of a failed run never prevents a new execution triggered by a new commit from proceeding. In a multi-branch setup, each branch maintains its own independent execution history, so a failure in one branch has no blocking effect on another branch's pipeline run.
- B
The CodeDeploy agent on the instances is not running, causing the deployment to fail.
An unhealthy or stopped CodeDeploy agent manifests as per-instance errors during the deployment, such as 'agent unavailable' or 'no hosts succeeded', and the deployment itself would start and then fail. It would not prevent a new deployment from being queued or created in the deployment group. The pipeline's Deploy action would attempt to create a deployment and then report instance-level failures, not show that a new deployment cannot begin.
- C
The pipeline is configured with a high frequency of changes, causing throttling from CodePipeline.
Why wrong: CodePipeline throttling is an API-level rate limit (for example, ThrottlingException on GetPipelineExecution or PutJobSuccessResult), not a deployment-group capacity limit. Even with a high frequency of branch commits, pipelines are designed to handle continuous delivery, and throttling would be rare and would surface as intermittent API errors, not as a persistent inability to start a deployment. A throttling error would affect the pipeline's ability to invoke or poll actions, but it would not be described as a deployment being blocked by an existing deployment.
- D
A previous deployment is still in progress or frozen in the CodeDeploy deployment group.
Why wrong: CodeDeploy enforces a concurrency limit of one in-progress deployment per deployment group by default. If a previous deployment is still running, stopped mid-lifecycle, or frozen (for example, pending a rollback or waiting on a manual approval), the service refuses to start a new deployment and returns an error indicating that a deployment is already in progress. With a multi-branch strategy, two pipelines can try to deploy to the same group nearly simultaneously; the second pipeline's Deploy action will wait or fail because the deployment group is not available, not because of the pipeline itself.