AWS Certified Developer – Associate — Question 132
A developer is using an AWS CodeCommit repository to store source code for an application. The developer is using an AWS CodePipeline pipeline to deploy the application. The pipeline does not start automatically and must be started manually when a deployment is needed.
The developer needs to configure the pipeline to start automatically.
Which solution meets this requirement with the LEAST delay?
Answer options
- A. Create a webhook in the CodeCommit repository to directly call the CodePipeline API to start the pipeline.
- B. Create an Amazon EventBridge (Amazon CloudWatch Events) rule to start the pipeline upon the detection of changes in the CodeCommit repository.
- C. Configure the pipeline to poll the CodeCommit repository for changes and to 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 post to the CodePipeline API to start the pipeline.
Correct answer: B
Explanation
The correct answer is B because creating an Amazon EventBridge rule allows for immediate response to changes in the CodeCommit repository, ensuring the pipeline starts automatically with minimal delay. Option A involves a manual setup of a webhook, which may introduce latency. Option C's polling method is less efficient as it does not provide real-time responses. Option D adds unnecessary complexity with SNS, which is not as direct as using EventBridge.