DOP-C02 Configuration Management and IaC Practice Question
A company uses AWS CodePipeline to automate deployments. The pipeline has a source stage (CodeCommit), a build stage (CodeBuild), and a deploy stage (CodeDeploy). The DevOps engineer notices that the pipeline fails intermittently during the deploy stage with the error: 'The deployment failed because the deployment group does not exist'. What is the most likely cause?
⚠ Common exam trap
Many candidates assume permission or naming errors cause consistent failures, but the intermittent nature of the error points to a resource lifecycle issue—specifically, the deployment group being deleted or renamed after pipeline configuration.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
The deployment group was deleted or renamed after the pipeline was configured
The intermittent 'deployment group does not exist' error indicates that the deployment group referenced in the CodePipeline deploy stage configuration is missing at the time of execution. This most commonly occurs when the deployment group has been deleted or renamed after the pipeline was initially configured, causing the pipeline to reference a non-existent resource. Since the error is intermittent, it suggests the deployment group may be deleted and recreated or renamed during certain operations, rather than a permanent misconfiguration.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
The deployment group was deleted or renamed after the pipeline was configured
Why this is correct
When a pipeline's deploy action references a CodeDeploy deployment group, CodeDeploy resolves that group by name and deployment group ID at execution time. If the group was deleted or renamed after pipeline configuration, the deploy action fails with a DeploymentGroupDoesNotExist or similar error when CodeDeploy attempts the deployment. The pipeline configuration itself stores the name, not a live reference, so the failure occurs at run time, not when the pipeline is edited. This is the classic cause when the error explicitly indicates the deployment group cannot be found.
- ✗
The Auto Scaling group associated with the deployment group has insufficient capacity
Why it's wrong here
Insufficient ASG capacity would not cause a missing group error. During a CodeDeploy deployment to an Auto Scaling group, CodeDeploy checks the group's desired/min/max capacity and healthy instance count. If capacity is insufficient, the deployment fails with a capacity-related error like 'The deployment failed because the Auto Scaling group's minimum size was not met' or 'Insufficient capacity' — not a 'deployment group not found' error. The group still exists and is valid, so the failure mode is entirely different.
- ✗
The CodePipeline service role does not have permission to call CodeDeploy
Why it's wrong here
A missing IAM permission on the CodePipeline service role would surface as an AccessDeniedException when CodePipeline calls CodeDeploy's API, such as during CreateDeployment or GetDeployment. The error would be an authorization failure at the IAM policy evaluation level, not a 'deployment group does not exist' message. The pipeline might show a permission error in CloudTrail, and the deploy action would fail before any deployment is even created.
- ✗
The CodeDeploy application name in the pipeline is misspelled
Why it's wrong here
Misspelling the application name in the pipeline configuration would cause an 'ApplicationDoesNotExist' or 'ApplicationNotFoundException' error because CodeDeploy cannot find the application, not the deployment group. Since the application is the parent container for deployment groups, a misspelled application name prevents CodeDeploy from ever reaching the deployment group lookup. The specific error would indicate the missing application, not the missing deployment group.
Go deeper
Related to this question
About these practice questions
One of 1,298 original DOP-C02 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This DOP-C02 practice question is part of Courseiva's free Amazon Web Services certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the DOP-C02 exam.