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.
You can add up to 10 upstream repositories to a CodeArtifact repository. You can only add one external connection.
There are separate API calls to add an upstream repository or an external connection.
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.