AWS CodeArtifact
Cloud service · AWS · Updated

AWS CodeArtifact

In short

AWS CodeArtifact is a managed artifact repository service that makes it easy for organizations to securely store, publish, and share software packages used in their software development process across their teams.

Cloud Services Hub →

8 key features of AWS CodeArtifact

AWS CodeArtifact is a secure, scalable, and fully managed artifact management service that supports multiple programming languages, integrates well with the AWS ecosystem, and facilitates the centralization of software packages for efficient collaboration and reuse.

01
Secure Artifact Management

AWS CodeArtifact allows you to securely store, publish, and share software packages used in your development, deployment, and runtime workflows. With its robust access control mechanisms, you can define who can or cannot manage and access your artifacts.

02
Support for Multiple Programming Languages

AWS CodeArtifact is designed to work seamlessly with a variety of programming languages and package management tools, including Maven and Gradle for Java, npm and yarn for Node.js, and pip for Python, ensuring broad compatibility and flexibility in different development ecosystems.

03
Fully Managed Service

As a fully managed service, AWS CodeArtifact abstracts away the overhead of scaling, maintaining, and securing a package management infrastructure, allowing you to focus on building and deploying your applications without worrying about the underlying systems.

04
Integration with AWS Ecosystem

AWS CodeArtifact is easily integrated with other AWS services, offering a cohesive environment that enhances development pipelines. Whether it's AWS CodeBuild for compiling code, AWS CodeDeploy for deployment, or AWS IAM for identity and access management, CodeArtifact works in tandem to provide a streamlined workflow.

05
Centralized Repository for Software Packages

It enables the creation of a centralized repository for your software packages, promoting collaboration among teams by facilitating easy sharing and management of packages, both for internal and public use, thus improving efficiency and reducing duplication of effort.

06
On-Demand Public Package Caching

Connect a private CodeArtifact repository to an external public repository to fetch and store packages on demand when a package manager requests them.

07
Upstream CodeArtifact Repositories

An upstream relationship between CodeArtifact repositories effectively merges their contents from the package manager client's perspective.

08
Polyglot Repositories

A single CodeArtifact repository can contain packages of any supported type.

Where AWS CodeArtifact is used

AWS CodeArtifact serves as a secure and private package repository that integrates with the software development lifecycle, simplifies dependency management and version control, and enhances collaborative development across teams.

  1. 01
    Secure, Private Package Repository

    AWS CodeArtifact allows organizations to securely store, publish, and share software packages within their private, secure domain, eliminating the risk associated with public repositories. It supports popular package formats such as npm, PyPI, Maven, and NuGet, enabling teams to use their favorite development tools without compromise.

  2. 02
    Software Development Lifecycle Integration

    By integrating seamlessly with the development lifecycle, AWS CodeArtifact works with existing CI/CD pipelines to automate the build, test, and deployment processes. This reduces manual errors and increases efficiency, allowing teams to focus on coding rather than managing dependencies.

  3. 03
    Dependency Management and Version Control

    AWS CodeArtifact simplifies the management of software dependencies and version control, providing development teams with a single source of truth for all their package needs. Developers can easily track, fetch, and publish different versions of packages, ensuring consistency and reliability across environments.

  4. 04
    Collaborative Development Across Teams

    Facilitates collaborative coding by enabling teams to share packages across projects within an organization securely. This enhances code reuse and consistency, while also speeding up the development process by reducing the need to recreate software components that are already available within the organization.

How AWS CodeArtifact is priced

AWS CodeArtifact pricing is based on a pay-as-you-go model, charging for storage and data out, and offers a Free Tier for new users with 2 GB of storage and 100 GB data transfer out per month.

Pay-As-You-Go

AWS CodeArtifact has no upfront fees or commitments. Artifact storage charges depend on the storage size in GB and how long the artifacts are stored during the month.

Free Tier

AWS CodeArtifact includes a monthly AWS Free Tier for storage and requests.

Requests

CodeArtifact charges for requests, with the same charge for all request types. Each asset downloaded by CodeArtifact from a public artifact repository also counts toward the request count.

Data Transfer

Bandwidth into and out of CodeArtifact is chargeable except for data transferred in from the Internet and data transfer between CodeArtifact and another AWS service in the same AWS Region.

Services AWS CodeArtifact works with

AWS CodeBuildAWS CodeBuild

AWS CodeBuild can be used to build and test packages stored in CodeArtifact repositories.

AWS CodePipelineAWS CodePipeline

AWS CodePipeline can incorporate CodeArtifact repositories within its build, test, and deploy stages to automate software release processes.

AWS LambdaAWS Lambda

AWS Lambda functions can retrieve dependencies stored in CodeArtifact repositories to use in serverless applications.

AWS Cloud9AWS Cloud9

AWS Cloud9 IDE can integrate with CodeArtifact to pull in development dependencies and manage packages directly within the development environment.

Amazon EC2Amazon EC2

Amazon EC2 instances can access CodeArtifact repositories to install software packages and dependencies required for various applications and services running on the instances.

Amazon EventBridgeAmazon EventBridge

CodeArtifact sends package-version change events to Amazon EventBridge. EventBridge rules can match changes in a particular repository or package and trigger automation when a package version is published or updated.

Amazon S3Amazon S3

CodeArtifact stores package assets in Amazon S3 and uses S3 to deliver package downloads. Clients accessing CodeArtifact privately from a VPC also need connectivity to S3, typically through an S3 gateway endpoint.

Amazon Simple Notification Service (Amazon SNS)Amazon Simple Notification Service (Amazon SNS)

CodeArtifact package-version events can be routed through an EventBridge rule to an Amazon SNS topic. This lets subscribers receive notifications when packages are published or changed in a repository.

Amazon VPCAmazon VPC

CodeArtifact supports private access from an Amazon VPC through interface endpoints for its API and repository endpoints. Together with an S3 gateway endpoint for package downloads, these allow package operations without an internet gateway or NAT gateway.

What is AWS CodeArtifact

2 min read

AWS CodeArtifact is a fully managed artifact repository service provided by Amazon Web Services (AWS) that facilitates the secure storage, publishing, and sharing of software packages used in the software development process. 

Repositories are grouped into domains. Each repository belongs to a single domain and cannot be moved to another domain.

A package asset is stored only once per domain, even when it appears in multiple repositories within that domain.

This service is designed to work seamlessly with popular package management tools, making it easier for developers to manage dependencies and streamline their build and deployment processes. The core functionality of AWS CodeArtifact revolves around its ability to support a variety of programming languages and package formats, such as npm for JavaScript, NuGet for .NET, Maven for Java, and others. By accommodating these formats, AWS CodeArtifact ensures that development teams can employ it regardless of the programming languages or technologies they use. This flexibility significantly enhances its appeal across a broad spectrum of software development projects. 

The default maximum file size per package asset is 5 GB; this quota is adjustable.

npm publishing requests have a separate, non-adjustable 2 GB limit that includes both package metadata and the package tar archive, so the published npm package itself must be smaller than 2 GB.

AWS CodeArtifact integrates smoothly with other AWS services, offering a cohesive experience for developers who are already part of the AWS ecosystem. For instance, it can be used in conjunction with AWS CodeBuild, AWS CodeDeploy, and AWS CodePipeline to automate the build, test, and deployment phases of the software development lifecycle, thereby promoting a DevOps culture and practices. This integration is pivotal for teams looking to achieve continuous integration and continuous delivery (CI/CD) goals. Security is a critical aspect of AWS CodeArtifact, which provides features like fine-grained permissions and control over who can access and manage software packages. This is achieved through the integration with AWS Identity and Access Management (IAM), allowing administrators to define policies that govern access to the artifact repositories. Additionally, AWS CodeArtifact automatically encrypts stored packages, ensuring that sensitive code is protected both at rest and in transit. Another key benefit of using AWS CodeArtifact is its scalability and reliability. Being a managed service, it eliminates the need for organizations to provision, configure, and maintain infrastructure for their artifact repositories. AWS takes care of the underlying infrastructure, ensuring high availability and scalability to meet the demands of development projects of any size. This means that development teams can focus more on writing code and less on managing the tools that support their processes. In conclusion, AWS CodeArtifact represents a critical tool in the software development lifecycle, offering a secure, scalable, and highly integrated platform for managing software packages and dependencies. By reducing the complexity associated with package management and facilitating seamless integration with other AWS services, CodeArtifact empowers developers to improve their productivity and accelerate the delivery of high-quality software.

Concepts related to AWS CodeArtifact

AWS CodeArtifact exam questions

Real practice exam questions on AWS CodeArtifact, with the correct answer and its explanation. Answer them with every option in the exam simulator.

DOP-C02

A company stores internal npm packages in an AWS CodeArtifact domain. A release pipeline publishes candidate packages to a candidate repository. After integration tests pass, the pipeline records each package's name, version, and CodeArtifact package version revision. A manual approval can remain pending for several days. During that time, maintainers might delete and republish a candidate using the same package name and version.

Production builds use a separate production repository in the same domain. This repository has no upstream repositories. Only the promotion role can modify production packages. The company requires promotion to fail if a candidate's revision has changed since testing. Production builds must not access unapproved candidates, and promotion must never replace an existing production package version with different contents.

Which promotion configuration meets these requirements?

Show answerCORRECT ANSWER

After approval, call CopyPackageVersions from the candidate repository to the production repository. Specify the approved versions and their recorded revisions in version-revisions, and leave allow-overwrite disabled. Keep the production repository without upstream repositories.

CopyPackageVersions supports copying between repositories in the same domain. The version-revisions parameter makes the copy fail for a version whose source revision no longer matches the tested revision. Leaving overwrite disabled prevents replacement of an existing production version with different contents. Having no upstream connection prevents production builds from resolving unapproved candidates.

Practice AWS CodeArtifact in a full exam

Questions on AWS CodeArtifact in each practice exam, with every answer option and an explanation for each:

Start a free practice exam

Learn AWS CodeArtifact in lessons

2 short lessons on AWS CodeArtifact in 1 certification course.

Open the lessons

AWS architecture icons are the property of Amazon Web Services. BlowStack is not affiliated with or endorsed by AWS.