Courseiva
SDLC Automation →easyMultiple Choice

DOP-C02 SDLC Automation Practice Question

A development team is using AWS CodeCommit as a source control repository. They want to automate code builds and run unit tests every time a developer pushes code to the 'develop' branch. Which AWS service should they use to trigger the build automatically?

⚠ Common exam trap

It's easy for candidates to think CloudWatch Events alone is sufficient (Option D), but they overlook that CodePipeline provides a higher-level orchestration layer that simplifies CI/CD management, and the exam expects the best-practice service for automating builds on code pushes.

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

✓

Create an AWS CodePipeline with CodeCommit as source and CodeBuild as build stage, configured to start on source changes.

AWS CodePipeline can be configured with CodeCommit as the source stage and CodeBuild as the build stage, and by enabling the 'Amazon CloudWatch Events' trigger on the pipeline, it automatically starts whenever a change is pushed to the specified branch (e.g., 'develop'). This is the native, fully managed way to achieve continuous integration without custom scripting or additional 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.

  • ✓

    Create an AWS CodePipeline with CodeCommit as source and CodeBuild as build stage, configured to start on source changes.

    Why this is correct

    AWS CodePipeline is purpose-built for continuous delivery and natively integrates CodeCommit as a source action with CodeBuild as a build action. The pipeline automatically subscribes to CodeCommit repository events (via Amazon EventBridge under the hood) so any push to the selected branch immediately triggers the build stage. This is the recommended, fully managed approach because it also provides artifact passing, stage sequencing, and optional manual approvals without requiring custom glue code.

  • ✗

    Set up AWS CodeDeploy to run builds on code push.

    Why it's wrong here

    AWS CodeDeploy is an deployment automation service, not a build service. It only deploys pre-built application revisions to compute platforms like EC2, Lambda, or ECS; it has no capability to compile source code, run unit tests, or produce build artifacts. Configuring CodeDeploy to 'run builds on code push' misunderstands its role—there is no build action in CodeDeploy, and it cannot replace the build step that CodeBuild or a similar service would perform.

  • ✗

    Configure AWS CodeCommit to invoke AWS CodeBuild directly.

    Why it's wrong here

    CodeCommit does not have a native integration that invokes CodeBuild directly on a push. CodeCommit exposes Git events and can send notifications via Amazon SNS or EventBridge, but it does not contain a 'trigger build' action directed at CodeBuild's BuildProject. Without an intermediary orchestrator (like CodePipeline or a custom EventBridge rule), there is no built-in mechanism inside CodeCommit to start a code build, so this configuration is not technically valid.

  • ✗

    Use Amazon CloudWatch Events to detect a push to CodeCommit and trigger AWS CodeBuild.

    Why it's wrong here

    While an EventBridge rule can detect a CodeCommit push and directly invoke CodeBuild, this approach is a manual, custom event-driven setup. You must write the event rule, handle IAM permissions, and manage concurrency and state yourself, and you lose pipeline features such as staggered deployment stages, approval gates, and automatic artifact handoff. CodePipeline already encapsulates this event-to-trigger behavior natively, so hand-building it with EventBridge is unnecessarily complex and not the recommended pattern.

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 →

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.