nerdexam
Amazon

DVA-C02 · Question #499

A developer must cache dependent artifacts from Maven Central, a public package repository, as part of an application's build pipeline. The build pipeline has an AWS CodeArtifact repository where arti

The correct answer is A. Modify the existing CodeAriifact repository to associate an upstream repository with the public. CodeArtifact upstream repository associations allow an existing repository to proxy and cache packages from an external public repository like Maven Central, requiring only a configuration change rather than pipeline modifications.

Submitted by yaw92· Mar 5, 2026Development with AWS Services

Question

A developer must cache dependent artifacts from Maven Central, a public package repository, as part of an application's build pipeline. The build pipeline has an AWS CodeArtifact repository where artifacts of the build are published. The developer needs a solution that requires minimum changes to the build pipeline. Which solution meets these requirements?

Options

  • AModify the existing CodeAriifact repository to associate an upstream repository with the public
  • BCreate a new CodeAtfact repository that has an external connection to the public package
  • CCreate a new CodeAifact domain that contains a new repository that has an external connection
  • DModify the CodeAnifact repository resource policy to allow artifacts to be fetched from the public

How the community answered

(48 responses)
  • A
    83% (40)
  • B
    10% (5)
  • C
    4% (2)
  • D
    2% (1)

Why each option

CodeArtifact upstream repository associations allow an existing repository to proxy and cache packages from an external public repository like Maven Central, requiring only a configuration change rather than pipeline modifications.

AModify the existing CodeAriifact repository to associate an upstream repository with the publicCorrect

By associating an upstream repository (configured with an external connection to Maven Central) with the existing CodeArtifact repository, package requests that miss the local cache are automatically fetched from Maven Central and stored. This approach requires only a repository configuration change and no modifications to the build pipeline's repository URL, satisfying the minimum-changes requirement.

BCreate a new CodeAtfact repository that has an external connection to the public package

Creating a new repository requires updating the build pipeline to point to the new repository URL, which constitutes additional pipeline changes beyond the minimum required.

CCreate a new CodeAifact domain that contains a new repository that has an external connection

Creating a new CodeArtifact domain and repository is unnecessary overhead; the existing repository can be enhanced with an upstream association, and a new domain adds administrative complexity.

DModify the CodeAnifact repository resource policy to allow artifacts to be fetched from the public

CodeArtifact resource policies control cross-account access permissions, not the ability to fetch packages from public external repositories; external connections are configured through upstream repository associations, not resource policies.

Concept tested: CodeArtifact upstream repository external connection for Maven Central

Source: https://docs.aws.amazon.com/codeartifact/latest/ug/external-connection.html

Community Discussion

No community discussion yet for this question.

Full DVA-C02 Practice