DOP-C02 SDLC Automation Practice Question
A company uses AWS CodePipeline to automate deployments. The pipeline consists of Source, Build, and Deploy stages. The Build stage uses CodeBuild, and the Deploy stage uses CodeDeploy. Recently, the pipeline failed at the Deploy stage with an error: 'The deployment group does not exist'. Which TWO actions should the team take to resolve this issue?
⚠ Common exam trap
It's easy for candidates to confuse the deployment group name with the CodeDeploy application name, or assume that the pipeline will automatically create the deployment group, leading them to choose irrelevant options like increasing timeout or checking CodeBuild permissions.
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
✓
Verify that the deployment group name specified in the pipeline's Deploy stage matches the actual deployment group name in CodeDeploy.
The error 'The deployment group does not exist' directly indicates a mismatch between the deployment group name specified in the CodePipeline Deploy stage configuration and the actual deployment group name defined in CodeDeploy. The pipeline's Deploy stage action references a deployment group by name; if that name does not match an existing group in CodeDeploy, the deployment fails. Verifying and correcting this name resolves the issue.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Verify that the deployment group name specified in the pipeline's Deploy stage matches the actual deployment group name in CodeDeploy.
Why this is correct
The `Deploy` stage action stores a literal `DeploymentGroupName` string that must exactly match the name of an existing deployment group in the target CodeDeploy application. This string is case-sensitive and cannot include trailing spaces or a mangled formatted name. When CodeDeploy receives the pipeline's `CreateDeployment` API call, it validates the deployment group against the application in the region; if no exact match exists, it returns the 'Deployment group not found' error. To resolve it, open the pipeline's Deploy stage action and compare the `DeploymentGroupName` value to the deployment group name shown in the CodeDeploy console.
- ✓
Confirm that the pipeline and the CodeDeploy deployment group are in the same AWS Region.
Why this is correct
The CodeDeploy deployment group, the CodeDeploy application, and the pipeline's Deploy action must all resolve to resources in the same AWS Region. When a pipeline executes, the `Deploy` stage calls the CodeDeploy service in the pipeline's region, and that service only looks up deployment groups within that regional scope. If the pipeline is in one region (e.g., us-east-1) and the deployment group was created in a different region (e.g., us-west-2), the API call will not find the deployment group even if the name is correct. Cross-region support in CodePipeline exists, but it requires configuring the action with a different `Region` and an appropriate customer-managed service role for that region.
- ✗
Increase the timeout for the Deploy stage to allow more time for the deployment group to be created.
Why it's wrong here
The timeout setting on a CodePipeline Deploy stage controls how long the pipeline waits for a deployment to reach a terminal state (SUCCESS or FAILED) before it marks the action as timed out. A 'deployment group not found' error is an immediate validation failure that occurs before any deployment is even created; CodeDeploy's API rejects the request because the named deployment group does not exist. Therefore, increasing the timeout value has no effect on the resource lookup and cannot give CodeDeploy extra time to create the deployment group. The deployment group must be created beforehand in CodeDeploy, not during pipeline execution.
- ✗
Ensure that the CodeBuild project has permissions to access the CodeDeploy deployment group.
Why it's wrong here
CodeBuild is only relevant to the build stage of the pipeline; its IAM service role grants access to resources like CodeCommit, S3 artifacts, and ECR, but it never interacts with CodeDeploy. When the pipeline runs its Deploy stage, it is CodePipeline's own service role (the one assigned to the pipeline) that makes the `codedeploy:CreateDeployment` and `codedeploy:GetDeployment` API calls. If that pipeline service role lacks permissions to the deployment group, you'd get an access-denied error, not a 'deployment group not found' error. Since the pipeline's Deploy stage is failing specifically because the group doesn't exist, checking the CodeBuild project's permissions will not resolve it.
- ✗
Check that the CodeDeploy application exists in the same AWS account as the pipeline.
Why it's wrong here
In a typical same-account setup, the CodeDeploy application and deployment group live in the same AWS account as the CodePipeline, because all resources are created and managed from that account. If the pipeline and the deployment group were in different accounts, the pipeline would need an explicit cross-account action with a role established via STS and a KMS-managed artifact bucket, and the error message would likely be an access-denied or API error, not a plain 'deployment group not found'. The error you are seeing instead indicates the deployment group cannot be located by the API call, which is far more commonly caused by a name mismatch or region mismatch. Thus, while account alignment is good to check in cross-account scenarios, it is not the immediate root cause here.
Visual reference
Go deeper
Related to this question
About these practice questions
This DOP-C02 question is part of Courseiva's 1,013-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.