Skip to content

Latest commit

 

History

History

CodeArtifact

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

CodeArtifact notes


Useful Libs and Tools


Examples


Recommendation for cross account setup

Creating a domain based on organizational ownership (Source)

  1. Recommendation
    • Generally we recommend creating one domain per company.
    • In some cases it may also be beneficial to have a sandbox domain where prototype repositories reside.
    • In a sandbox domain teams are at liberty to create their own repositories and experiment as needed, without affecting product deliverable assets.
    • Using a sandbox domain will duplicate packages, isolate repositories since you cannot copy packages between domains, and increase costs since package deduplication is handle at the domain level.
    • Organizing packages by domain ownership increases the cache hits on a package within the domain and reduces cost for each subsequent package fetch request.
    • The domain allows organizational policy to be applied across multiple repositories. A domain deduplicates storage of the repositories packages.
  2. CopyPackageVersions
    • Whenever a package is fetched from a repository, the asset is cached in your CodeArtifact domain to minimize the cost of subsequent downstream requests.

    • A given asset only needs to be stored once in a domain, even if it’s available in two—or two thousand—repositories. That means you only pay for storage once.

    • Copying a package version with the CopyPackageVersions API is only possible between repositories within the same CodeArtifact domain.

    • Cannot copy if have diff domain owners

      REPO              DOMAIN         DOMAIN_OWNER
      my-shared-repo    domain-my-org  111122223333
      my-team-repo      domain-my-org  444455556666
      

Cross-account domains

  • Domain names only need to be unique within an account, which means there could be multiple domains within a region that have the same name. Because of this, if you want to access a domain that is owned by an account you are not authenticated to, you must provide the domain owner ID along with the domain name

You can make packages in one repository available to another repository in the SAME domain.

  • To do this, configure one repository as an upstream of the other.
  • All package versions available to the upstream repository are also available to the downstream repository.
  • In addition, all packages that are available to the upstream repository through an external connection to a public repository are available to the downstream repository.
  • (Source)