DOP-C02 SDLC Automation Practice Question
A development team is using AWS CodeCommit as a source repository and AWS CodePipeline to automate their CI/CD pipeline. The pipeline includes a build stage that runs on AWS CodeBuild. The team wants to automatically trigger the pipeline when changes are pushed to the 'develop' branch of the CodeCommit repository. Which configuration change should be made to the pipeline?
⚠ Common exam trap
It's easy for candidates to confuse CodeBuild webhooks (which trigger a build directly) with CodePipeline's native event-driven triggers, leading them to select Option D, even though CodePipeline does not use webhooks for CodeCommit sources.
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
✓
Configure the source action to use CodeCommit as the source provider and specify the 'develop' branch.
CodePipeline's source action can be configured to use CodeCommit as the source provider, and by specifying the 'develop' branch in the source action configuration, the pipeline will automatically start a new execution whenever a change is pushed to that branch. This is the native and recommended way to trigger a pipeline from a CodeCommit repository branch change, without needing additional webhooks or event notifications.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Enable S3 event notifications on the repository to invoke the pipeline.
Why it's wrong here
S3 event notifications are only available on Amazon S3 buckets and react to object-level events such as PUT, POST, or DELETE on objects in the bucket. A CodeCommit repository is a Git-based version control service, not an S3 bucket, so there is no bucket ARN or S3 event source to associate with the repository. Even if the pipeline stores artifacts in S3, commit pushes to CodeCommit do not generate S3 events; the correct automatic trigger is a CloudWatch Events rule for CodeCommit branch changes, which is configured via the source action.
- ✗
Add a manual approval action before the build stage.
Why it's wrong here
A manual approval action is designed to pause a pipeline after a stage completes and require an authorized user to approve or reject the progression to the next stage. It does not initiate a pipeline run; on the contrary, placing it before the build stage would require human intervention on every execution, which is the opposite of continuous automatic deployment. Since the pipeline would never start without a source change event, adding a manual approval does not satisfy the requirement to automatically invoke the pipeline when code is pushed to the 'develop' branch.
- ✓
Configure the source action to use CodeCommit as the source provider and specify the 'develop' branch.
Why this is correct
Configuring the source action with CodeCommit as the source provider and specifying the 'develop' branch is exactly how CodePipeline implements automatic change detection for a CodeCommit repository. The action references the repository and branch; on each update to that branch, CodePipeline uses an automatically managed CloudWatch Events rule (or event polling) to trigger a new pipeline execution. This is the recommended native integration, and it ensures every commit to the 'develop' branch starts the pipeline without custom webhooks or manual steps.
- ✗
Create a CodeBuild webhook on the CodeCommit repository.
Why it's wrong here
A CodeBuild webhook is created on a CodeBuild project and triggers that single build project directly when a push occurs to the repository, but it does not start a CodePipeline pipeline. If you rely on a webhook, you would bypass the pipeline's source, build, test, and deployment stages, potentially skipping required steps such as approvals or multiple environments. Furthermore, CodeCommit does not support arbitrary webhooks to third-party services; CodeBuild webhooks are configured on the build project itself, not on the repository, and they invoke only the build, not a multi-stage pipeline.
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.