AWS Certified Developer – Associate — Question 144
A developer is using an AWS CodePipeline pipeline to provide continuous integration and continuous delivery (CI/CD) support for a Java application. The developer needs to update the pipeline to support the introduction of a new application dependency .jar file. The pipeline must start a build when a new version of the .jar file becomes available.
Which solution will meet these requirements?
Answer options
- A. Create an Amazon S3 bucket to store the dependency .jar file. Publish the dependency .jar file to the S3 bucket. Use an Amazon Simple Notification Service (Amazon SNS) notification to start a CodePipeline pipeline build.
- B. Create an Amazon Elastic Container Registry (Amazon ECR) private repository. Publish the dependency jar file to the repository. Use an ECR source action to start a CodePipeline pipeline build.
- C. Create an Amazon Elastic Container Registry (Amazon ECR) private repository. Publish the dependency .jar file to the repository. Use an Amazon Simple Notification Service (Amazon SNS) notification to start a CodePipeline pipeline build.
- D. Create an AWS CodeArtifact repository. Publish the dependency .jar file to the repository. Use an Amazon EventBridge (Amazon CloudWatch Events) rule to start a CodePipeline pipeline build.
Correct answer: D
Explanation
The correct answer is D because AWS CodeArtifact is designed for managing dependencies and integrates well with event-driven architectures, allowing EventBridge to trigger builds based on new versions. Option A is incorrect as SNS notifications do not directly monitor S3 for changes. Option B does not utilize the most suitable service for dependency management. Option C also incorrectly uses SNS for triggering builds instead of an event-based approach.