DOP-C02 SDLC Automation Practice Question
A DevOps engineer is troubleshooting a failed CodePipeline execution. The pipeline has a source stage from CodeCommit, a build stage using CodeBuild, and a deploy stage using CodeDeploy. The build stage succeeds, but the deploy stage fails with 'No deployments found for the specified deployment group.' Which TWO actions should the engineer take to resolve this?
⚠ Common exam trap
Candidates often assume the error is due to IAM permissions (Option A) or source issues (Option E), when the real cause is a Region mismatch or a misconfigured deployment group name in the pipeline definition.
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
✓
Confirm that the CodeDeploy deployment group exists in the same AWS Region as the pipeline.
CodePipeline and CodeDeploy must operate in the same AWS Region. If the deployment group is in a different Region, CodePipeline cannot find it, resulting in the 'No deployments found' error. This is a common cross-Region misconfiguration that prevents the deploy stage from locating the specified deployment group.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Update the IAM role for CodePipeline to allow it to list deployment groups.
Why it's wrong here
Updating the IAM role to allow code deploy:ListDeploymentGroups would only address an authorization failure, but the error message is explicitly about the deployment group not being found. If the pipeline's service role lacked permissions to list or access the deployment group, the error would be an AccessDeniedException, not a 'deployment group does not exist' or 'not found' error. Since the deploy stage already attempted to run, the role already has the necessary permissions to perform the deployment; the failure is a resource lookup issue, not a policy issue. Therefore, modifying IAM permissions is irrelevant to resolving this specific error.
- ✓
Confirm that the CodeDeploy deployment group exists in the same AWS Region as the pipeline.
Why this is correct
CodePipeline and CodeDeploy are regional services. When a pipeline deploys to a CodeDeploy deployment group, the pipeline's deploy action resolves that group by name within the same AWS Region where the pipeline is running. If the deployment group exists only in a different region, the action cannot find it and fails with a 'deployment group not found' error. This is a common cause, especially when copying pipeline templates across regions without recreating the deployment stack. You must either create the deployment group in the same region as the pipeline or configure a cross-region action with a corresponding artifact bucket in the target region.
- ✗
Check the CodeBuild build logs for errors.
Why it's wrong here
The CodeBuild build logs are irrelevant because the pipeline successfully executed the build stage and moved to the deploy stage, where the error occurred. If the build had failed, the pipeline would have stopped in that stage and the deploy stage would never have run. The error at the deployment stage is specifically about the CodeDeploy deployment group configuration, not about the artifacts produced by the build. The build succeeded and produced the required output artifacts; checking its logs would only distract from the actual deployment group lookup failure.
- ✓
Verify that the deploy stage in CodePipeline is configured with the correct deployment group name.
Why this is correct
A typographical error, case mismatch, or stale reference to a deleted deployment group in the pipeline's deploy action configuration is the most direct cause of the 'deployment group not found' error. CodePipeline passes the deployment group name exactly as specified to CodeDeploy; any discrepancy—such as an extra space, wrong capitalization, or an outdated name—will cause CodeDeploy to fail the lookup. This is easily verified by comparing the name in the pipeline action's configuration with the actual deployment group name in the CodeDeploy console. Even if the group exists in the same region, a misspelled name will prevent the pipeline from finding it.
- ✗
Ensure the CodeCommit repository has a valid commit.
Why it's wrong here
The source stage already completed successfully, meaning the CodeCommit repository contains a valid commit and the pipeline successfully pulled that code. If the repository had no valid commit, the source action would fail and the pipeline would stop before reaching the build or deploy stages. Since the build stage also succeeded, the commit not only exists but produced a deployable artifact. The failure occurs after the build, so the root cause is entirely within the deployment configuration, not the source repository.
Visual reference
Go deeper
Related to this question
About these practice questions
This DOP-C02 question is part of Courseiva's 1,298-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. 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.