Courseiva
SDLC Automation →easyMultiple Choice

DOP-C02 SDLC Automation Practice Question

A development team uses AWS CodeCommit as a Git repository. They want to automatically trigger a build in AWS CodeBuild whenever a pull request is created or updated. Which AWS service should be used to detect the pull request events and start the build?

⚠ Common exam trap

Test-takers frequently confuse EventBridge with CloudWatch Events (its predecessor) or assume that SNS is sufficient for triggering builds, overlooking that EventBridge provides direct, event-driven integration with CodeBuild without intermediate services.

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 EventBridge

Amazon EventBridge can capture CodeCommit repository events, such as pull request creation and updates, via its event bus. By setting up an EventBridge rule that matches these specific events, you can directly trigger an AWS CodeBuild project as a target, enabling automated builds without additional orchestration services.

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 Simple Notification Service (SNS)

    Why it's wrong here

    Amazon SNS is a pub/sub notification service that can forward CodeCommit notifications (e.g., pull request or comment events) to subscribers, but it does not natively parse repository events or map them to CodeBuild executions. To trigger CodeBuild via SNS you would need a Lambda function subscribed to the topic that receives the notification and then calls the StartBuild API, making it an indirect and brittle solution compared to EventBridge's native rule-based targeting.

  • ✗

    AWS CodePipeline

    Why it's wrong here

    AWS CodePipeline is a continuous delivery orchestration service that can consume events from EventBridge (or poll CodeCommit) to start its own pipeline stages, but it is not an event-detection mechanism itself. CodePipeline reacts to events rather than detecting them, and while a pipeline can include a CodeBuild action, the question asks which service directly detects a CodeCommit change and triggers the build; using CodePipeline as the trigger would add an unnecessary orchestration layer when EventBridge can invoke CodeBuild directly.

  • ✗

    Amazon CloudWatch Logs

    Why it's wrong here

    Amazon CloudWatch Logs is designed to store, monitor, and query log data from applications and AWS services; it does not have built-in awareness of CodeCommit repository state or the ability to filter Git reference events. You might use CloudWatch Logs to record build output from CodeBuild, but that is a downstream activity — it cannot detect a commit or push to trigger a build, and the active event-routing in this scenario would be handled by EventBridge, not by the log store itself.

  • ✓

    Amazon EventBridge

    Why this is correct

    Amazon EventBridge (formerly CloudWatch Events) is the correct service because it provides a default event bus that captures AWS service events, including CodeCommit repository events like 'Reference Created', 'Reference Updated', and 'Reference Deleted'. By defining a rule with an event pattern filtered by repository and branch, EventBridge can directly trigger a CodeBuild project through a built-in integration, passing commit details like the commit ID and branch name to the build, enabling fully event-driven CI/CD without custom glue code.

About these practice questions

Courseiva writes every DOP-C02 question from scratch — 1,298 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

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.