DVA-C02 Deployment Practice Question
A developer is setting up a CI/CD pipeline for a Python application using AWS CodeCommit, CodeBuild, and CodeDeploy. The developer wants to trigger the pipeline automatically when code is pushed to the master branch. Which TWO actions are required? (Choose two.)
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
✓
Set the source stage in the pipeline to use AWS CodeCommit as the source provider.
Options B and D are correct because B is necessary: the pipeline source stage must use AWS CodeCommit as the provider to detect pushes to the repository. D is also required: a webhook configured in CodeCommit sends push events to the pipeline, triggering it automatically. Option A is incorrect because CodeDeploy is a deployment stage, not a trigger. Option C is incorrect because a scheduled CloudWatch Events rule would trigger the pipeline on a schedule, not on code pushes. Option E is incorrect because CloudTrail logs API calls but does not trigger pipelines.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Configure CodeDeploy to run after the build stage.
Why it's wrong here
CodeDeploy is a deploy action, not a trigger.
- ✓
Set the source stage in the pipeline to use AWS CodeCommit as the source provider.
Why this is correct
The source stage must be configured to pull from CodeCommit.
- ✗
Create a CloudWatch Events rule to trigger the pipeline on a schedule.
Why it's wrong here
This would be for scheduled triggers, not push events.
- ✓
Configure a webhook in CodeCommit to trigger the pipeline.
Why this is correct
Webhooks notify CodePipeline on push events.
- ✗
Enable AWS CloudTrail to log API calls.
Why it's wrong here
CloudTrail is for auditing, not triggering pipelines.
Go deeper
Related to this question
About these practice questions
One of 724 original DVA-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 DVA-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 DVA-C02 exam.