Select your cookie preferences

We use essential cookies and similar tools that are necessary to provide our site and services. We use performance cookies to collect anonymous statistics, so we can understand how customers use our site and make improvements. Essential cookies cannot be deactivated, but you can choose “Customize” or “Decline” to decline performance cookies.

If you agree, AWS and approved third parties will also use cookies to provide useful site features, remember your preferences, and display relevant content, including relevant advertising. To accept or decline all non-essential cookies, choose “Accept” or “Decline.” To make more detailed choices, choose “Customize.”

Working with upstream repositories in CodeArtifact

Focus mode
Working with upstream repositories in CodeArtifact - CodeArtifact

A repository can have other AWS CodeArtifact repositories as upstream repositories. This enables a package manager client to access the packages that are contained in more than one repository using a single repository endpoint.

You can add one or more upstream repositories to an AWS CodeArtifact repository using the AWS Management Console, AWS CLI, or SDK. To associate a repository with an upstream repository, you must have permission for the AssociateWithDownstreamRepository action on the upstream repository. For more information, see Create a repository with an upstream repository and Add or remove upstream repositories.

If an upstream repository has an external connection to a public repository, the repositories that are downstream from it can pull packages from that public repository. For example, suppose that the repository my_repo has an upstream repository named upstream, and upstream has an external connection to a public npm repository. In this case, a package manager that is connected to my_repo can pull packages from the npm public repository. For more information about requesting packages from upstream repositories or external connections, see Requesting a package version with upstream repositories or Requesting packages from external connections.

What's the difference between upstream repositories and external connections?

In CodeArtifact, upstream repositories and external connections behave mostly the same, but there are a few important differences.

  1. You can add up to 10 upstream repositories to a CodeArtifact repository. You can only add one external connection.

  2. There are separate API calls to add an upstream repository or an external connection.

  3. The package retention behavior is slightly different, as packages requested from upstream repositories are retained in those repositories. For more information, see Package retention in intermediate repositories.

PrivacySite termsCookie preferences
© 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved.