Q74 — AWS DVA-C02 Ch.2
Question 74 of 100 | ← Chapter 2
A developer is using an AWS CodeCommit repository to store application source code and AWS CodePipeline to deploy the application. The pipeline does not start automatically and must be manually started when deployment is required. The developer needs to configure the pipeline to start automatically. Which solution meets the requirement with the lowest latency?
- A. Create a webhook in the CodeCommit repository to directly invoke the CodePipeline API to start the pipeline.
- B. Create an Amazon EventBridge (formerly Amazon CloudWatch Events) rule to start the pipeline when a change is detected in the CodeCommit repository. ✓
- C. Configure the pipeline to poll the CodeCommit repository for changes and start automatically when changes are detected.
- D. Create a CodeCommit trigger for an Amazon Simple Notification Service (Amazon SNS) topic. Configure the SNS topic to publish to the CodePipeline API to start the pipeline.
Correct Answer: B. Create an Amazon EventBridge (formerly Amazon CloudWatch Events) rule to start the pipeline when a change is detected in the CodeCommit repository.
Explanation
Option B uses Amazon EventBridge to listen for CodeCommit events (e.g., referenceChanges) and trigger the pipeline immediately upon detection—enabling true event-driven, near-zero-latency automation. Option A requires custom webhook implementation and API call handling. Option D adds SNS as an intermediary layer, increasing latency and complexity. Option C relies on polling, which introduces inherent delays and inefficiency. Therefore, Option B delivers the lowest latency and simplest operational model.