How to Start CodePipeline Build When a New Dependency JAR Is Available?

DVA-C02 By islever Editorial Last updated

Short answer

D Create an AWS CodeArtifact repository. Publish the dependency .jar file to the repository. Use an Amazon EventBridge rule to start a CodePipeline pipeline build.

Question

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?
  1. 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.
  2. 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.
  3. 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.
  4. Create an AWS CodeArtifact repository. Publish the dependency .jar file to the repository. Use an Amazon EventBridge rule to start a CodePipeline pipeline build. Correct Answer

Key Takeaways

The exam tests your familiarity with CodePipeline source actions for third-party dependencies, and the trap is choosing S3 or ECR instead of CodeArtifact, the service purpose-built for software packages.

For AWS CodePipeline, use CodeArtifact to store dependency JARs and configure an EventBridge rule to trigger the pipeline when a new version is published; the community confirms D is correct.

Common mistake: Option A is the most tempting: S3 can hold JARs and SNS can send notifications, but SNS alone does not start a CodePipeline build and S3 does not provide package version events; CodeArtifact plus EventBridge is the intended managed solution.

Expert Analysis

Why the Answer Is Correct

CodeArtifact is a fully managed artifact repository designed for storing and publishing software packages like JAR files. An EventBridge rule can detect a new package version in CodeArtifact and automatically start the CodePipeline pipeline. This directly meets the requirement to start a build when a new dependency JAR becomes available. The comments link to official AWS documentation confirming this exact integration pattern. Therefore, D is correct.

Why the Other Options Are Wrong

Option A uses S3 and SNS, but S3 does not have package version semantics, and SNS is not the direct mechanism CodePipeline uses to start builds. Options B and C propose ECR, which is a container image registry, not a JAR artifact repository; the ECR source action is designed for Docker images. None of these services offer the package lifecycle events that CodeArtifact provides. Only CodeArtifact plus EventBridge gives the correct, managed solution for dependency-triggered builds.

Community Comment Notes

All commenters voted for D with 100% consensus. One comment highlights that the keyword "dependency" is a strong signal for CodeArtifact. Comments 2 and 3 provide the official AWS documentation URL for configuring CodeArtifact service events with CodePipeline. This reinforces that the intended answer relies on CodeArtifact's EventBridge integration rather than S3, SNS, or ECR. The community notes are useful both for this question and for real-world pipeline design.

Official Reference

Exam Strategy

When a question mentions 'dependency' or 'package', immediately think CodeArtifact rather than S3 or ECR. Remember that CodePipeline integrates with EventBridge to react to CodeArtifact package-version events, so look for that pairing in the options.

Community Votes

D
100%

100% of anonymous learners picked answer D. Votes are pick records left by other test-takers — they are not the verified answer.

Discussion 5 contributions

Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded, and comments reflect the views of individual contributors.

From public community threads 5

  1. KarBiswa 👍 3 Answered D
    https://docs.aws.amazon.com/codeartifact/latest/ug/configure-service-events-codepipeline.html#configure-service-events-codepipeline-create-rule
  2. trungtd 👍 3 Answered D
    AWS CodeArtifact is a managed artifact repository service that lets you securely store, publish, and share software packages.
  3. Anandesh 👍 1 Answered D
    https://docs.aws.amazon.com/codeartifact/latest/ug/configure-service-events-codepipeline.html
  4. Alabi 👍 1 Answered D
    D is correct Keyword for using CodeArtifact is Dependency
  5. 65703c1 👍 1 Answered D
    D is the correct answer.

Reader comments & corrections

No reader corrections yet — spotted an error or have a note? Share it below.

Log in to comment, report an error, or add a note about this question.

Submitted for moderation before publishing. Keep it helpful and respectful.

Practice All DVA-C02 Questions

Access 100 questions with complete answers and detailed explanations.

View Full DVA-C02 Practice Test →

← Back to DVA-C02 Study Guide