Courseiva
SDLC Automation →easyMultiple Choice

DOP-C02 SDLC Automation Practice Question

A development team uses AWS CodeCommit for source control and wants to automatically run unit tests on every push to the main branch. Which AWS service should they use to trigger the tests?

⚠ Common exam trap

Test-takers frequently confuse AWS CodeBuild as a standalone trigger because it can run tests, but they overlook that CodeBuild lacks native event-driven triggers and requires an orchestrator like CodePipeline or EventBridge to automate the start on a repository push.

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

✓

AWS CodePipeline

AWS CodePipeline is the correct service because it provides a fully managed continuous delivery service that can be configured to automatically trigger a build action (such as running unit tests in AWS CodeBuild) whenever a change is pushed to a specified branch in AWS CodeCommit. This is achieved by setting the source stage to the CodeCommit repository and branch, and then adding a build stage that invokes CodeBuild to execute the tests, enabling an automated CI/CD workflow.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    AWS CodeBuild

    Why it's wrong here

    AWS CodeBuild is a fully managed build service that compiles source code, runs unit tests, and produces deployable artifacts, but it is not an orchestrator. It cannot independently listen to CodeCommit repository events or chain multiple stages; it requires AWS CodePipeline (or another external trigger) to invoke its build/test projects and pass artifacts between stages.

  • ✗

    Amazon CloudWatch Events

    Why it's wrong here

    Amazon CloudWatch Events (now Amazon EventBridge) can detect a CodeCommit push via a rule and invoke a target like Lambda or CodeBuild, but it lacks the pipeline semantics of staged execution, sequential actions, approval gates, and artifact handoffs. It is an event-routing bus, not a CI/CD workflow engine, so it is unsuitable for orchestrating a full test-and-release pipeline.

  • ✓

    AWS CodePipeline

    Why this is correct

    AWS CodePipeline is the correct choice because it natively integrates with CodeCommit as a source action and automatically starts a pipeline execution on every push to the configured branch. It can then invoke test actions (e.g., CodeBuild or third-party test tools) in a defined stage, with options for parallel actions, approvals, and rollback—making it the standard CI/CD orchestrator for this use case.

  • ✗

    AWS CodeDeploy

    Why it's wrong here

    AWS CodeDeploy is a deployment automation service that pushes application revisions to compute services like EC2, Lambda, or ECS, and manages traffic shifting and rollbacks. It does not compile code, run tests, or react to repository pushes; it is deployed to after a pipeline has already built and tested the artifact, so it is irrelevant as the primary trigger or test runner in this scenario.

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.