DVA-C02 Deployment Practice Question
A developer is using AWS CodeCommit as a source repository. They want to automatically build and test code whenever a new branch is created. Which AWS service should they use to trigger the pipeline?
⚠ Common exam trap
Many candidates confuse the service that emits the event (CodeCommit) with the service that routes the event to the pipeline (CloudWatch Events/EventBridge), leading them to incorrectly select Lambda or SNS as the trigger mechanism.
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
✓
Amazon CloudWatch Events
Amazon CloudWatch Events (now part of Amazon EventBridge) can capture AWS CodeCommit repository events, such as the creation of a new branch. By setting a rule that matches the 'Reference Created' event type, you can automatically trigger an AWS CodePipeline pipeline execution, enabling continuous integration for new branches.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Amazon CloudWatch Events
Why this is correct
Amazon CloudWatch Events (now Amazon EventBridge) is the correct service for capturing and reacting to events from AWS CodeCommit. It allows developers to create rules that match specific repository activities, such as pushes to a branch or pull request state changes. These rules then route the events to various targets, including AWS CodePipeline to initiate a build, an AWS Lambda function for custom logic, or an Amazon SNS topic for notifications, making it the central hub for event-driven automation.
- ✗
Amazon S3 event notification
Why it's wrong here
Amazon S3 event notifications are exclusively designed to respond to actions performed on objects within Amazon S3 buckets, such as object creation, deletion, or modification. These notifications are configured directly on an S3 bucket and can trigger various actions. Since CodeCommit repositories store Git data, not S3 objects, S3 event notifications have no mechanism to detect or respond to changes within a CodeCommit repository.
- ✗
Amazon Simple Notification Service (SNS)
Why it's wrong here
Amazon Simple Notification Service (SNS) is a highly scalable messaging service used for publishing messages to multiple subscribers simultaneously. While SNS can be a *target* for events (e.g., CloudWatch Events can send notifications to an SNS topic), it is not an *event source* that directly monitors CodeCommit repositories. SNS itself does not detect CodeCommit changes or initiate downstream processes like CodePipeline; it merely distributes messages it receives from other services.
- ✗
AWS Lambda
Why it's wrong here
AWS Lambda is a serverless compute service that executes code in response to events. While a Lambda function can certainly process CodeCommit events (e.g., to perform custom validation or logging), Lambda itself is an *execution environment*, not an *event source* that detects changes in CodeCommit. To trigger a Lambda function based on CodeCommit activity, an intermediary event routing service like CloudWatch Events (EventBridge) is required to capture the CodeCommit event and invoke the Lambda function.
Go deeper
Related to this question
About these practice questions
This DVA-C02 question is part of Courseiva's 724-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 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.