DOP-C02 SDLC Automation Practice Question
A company uses AWS Elastic Beanstalk for deploying web applications. They want to automate deployments whenever a new commit is pushed to the master branch of their CodeCommit repository. Which AWS service should they use to trigger the deployment?
⚠ Common exam trap
Candidates often confuse CloudWatch Events (EventBridge) as a direct trigger for Elastic Beanstalk deployments, but it lacks the built-in pipeline orchestration and artifact management that CodePipeline provides for CI/CD workflows.
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 a fully managed continuous delivery service that can be configured to automatically trigger a deployment pipeline when a new commit is pushed to a CodeCommit repository's master branch. It integrates directly with CodeCommit as a source action and Elastic Beanstalk as a deployment provider, enabling end-to-end automation without custom scripting.
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 CloudTrail
Why it's wrong here
AWS CloudTrail is an audit and governance service that records API activity and user actions in your AWS account, but it does not execute workflows or deploy applications. Although CloudTrail can deliver event files to Amazon S3 or CloudWatch Logs, it provides no built-in action to update an Elastic Beanstalk environment. Any deployment triggered from CloudTrail would require external components like a Lambda function, making it an indirect custom solution. Therefore, CloudTrail is incorrect because it is purely a logging/auditing mechanism, not a CI/CD orchestration service.
- ✗
AWS OpsWorks
Why it's wrong here
AWS OpsWorks is a configuration management service based on Chef or Puppet that automates the setup, patching, and management of EC2 instances, such as installing software or applying system configurations. While OpsWorks can deploy applications to resources within its own stack, it does not natively integrate with CodeCommit as a source for continuously building and deploying to Elastic Beanstalk. Elastic Beanstalk is a fully managed PaaS, and OpsWorks would require custom recipes or additional setup to bridge the two services. Hence, OpsWorks is wrong because it focuses on server configuration rather than providing a code-to-deployment pipeline.
- ✗
Amazon CloudWatch Events
Why it's wrong here
Amazon CloudWatch Events (now Amazon EventBridge) is an event-routing service that triggers actions in response to AWS resource changes, such as invoking a Lambda function when a commit occurs in CodeCommit. However, CloudWatch Events does not natively know how to deploy code to Elastic Beanstalk; it would require you to write custom Lambda code that downloads the source, creates an application version, and calls the Elastic Beanstalk API—essentially reimplementing a deployment pipeline. CodePipeline, in contrast, offers pre-built source and deployment actions with built-in retry, sequencing, and rollback logic. Thus, while CloudWatch Events could initiate a Lambda-based custom workflow, it is not the native, fully managed service for this CI/CD use case.
- ✓
AWS CodePipeline
Why this is correct
AWS CodePipeline is a fully managed continuous delivery service that orchestrates the stages required to build, test, and deploy your application automatically. It includes a native CodeCommit source action that watches the repository for new commits and completes the deployment by invoking Elastic Beanstalk as a deployment provider, which creates and deploys a new application version to the environment. The service handles sequencing, failure handling, and manual approval gates without requiring custom glue code. Therefore, CodePipeline is the correct answer because it directly integrates the version control and deployment services in a single automated pipeline.
Go deeper
Related to this question
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 →
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.