# AWS CodeArtifact

Cloud service · AWS. Updated 2026-11-12. Page: https://blowstack.com/tools/cloud-services-hub/aws-codeartifact

> 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.

Practice exams covering AWS CodeArtifact: [DVA-C02 AWS Certified Developer - Associate](https://blowstack.com/practice-exams/aws-certified-developer-associate), [DOP-C02 AWS Certified DevOps Engineer - Professional](https://blowstack.com/practice-exams/aws-certified-devops-engineer-professional).

## 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.

1. **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.
2. **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.
3. **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.
4. **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.
5. **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.
6. **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.
7. **Upstream CodeArtifact Repositories**: An upstream relationship between CodeArtifact repositories effectively merges their contents from the package manager client's perspective.
8. **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. **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. **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. **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. **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 CodeBuild](https://blowstack.com/tools/cloud-services-hub/aws-codebuild)**: AWS CodeBuild can be used to build and test packages stored in CodeArtifact repositories.
- **[AWS CodePipeline](https://blowstack.com/tools/cloud-services-hub/aws-codepipeline)**: AWS CodePipeline can incorporate CodeArtifact repositories within its build, test, and deploy stages to automate software release processes.
- **[AWS Lambda](https://blowstack.com/tools/cloud-services-hub/aws-lambda)**: AWS Lambda functions can retrieve dependencies stored in CodeArtifact repositories to use in serverless applications.
- **[AWS Cloud9](https://blowstack.com/tools/cloud-services-hub/aws-cloud9)**: AWS Cloud9 IDE can integrate with CodeArtifact to pull in development dependencies and manage packages directly within the development environment.
- **[AWS Identity and Access Management (IAM)](https://blowstack.com/tools/cloud-services-hub/aws-identity-and-access-management-(iam))**: AWS IAM is used to manage access and permissions for interacting with CodeArtifact repositories.
- **[Amazon EC2](https://blowstack.com/tools/cloud-services-hub/amazon-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 EventBridge](https://blowstack.com/tools/cloud-services-hub/amazon-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 S3](https://blowstack.com/tools/cloud-services-hub/amazon-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)](https://blowstack.com/tools/cloud-services-hub/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 VPC](https://blowstack.com/tools/cloud-services-hub/amazon-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.
- **[AWS CloudFormation](https://blowstack.com/tools/cloud-services-hub/aws-cloudformation)**: CodeArtifact domains and repositories can be provisioned and configured through AWS CloudFormation resource types. Templates can define repository permissions, upstream repositories, and external connections for repeatable deployments.
- **[AWS CloudTrail](https://blowstack.com/tools/cloud-services-hub/aws-cloudtrail)**: CodeArtifact records API activity in AWS CloudTrail, including requests made by package-manager clients. These records identify the caller, request, source IP address, and time for auditing repository access and changes.
- **[AWS Key Management Service (AWS KMS)](https://blowstack.com/tools/cloud-services-hub/aws-key-management-service-(aws-kms))**: CodeArtifact encrypts the package assets and metadata in each domain with an AWS KMS key. A domain can use the AWS managed key or a customer managed key, allowing you to control the key policy and audit key usage.
- **[AWS PrivateLink](https://blowstack.com/tools/cloud-services-hub/aws-privatelink)**: CodeArtifact uses AWS PrivateLink to expose its API and repository services through interface VPC endpoints. Endpoint policies can restrict which CodeArtifact operations and resources are accessible through those endpoints.
- **[AWS Resource Groups and Tag Editor](https://blowstack.com/tools/cloud-services-hub/aws-resource-groups-and-tag-editor)**: CodeArtifact supports tagging its resources, allowing AWS Resource Groups and Tag Editor to organize and manage supported domains and repositories by tag. Teams can use shared project or environment tags to group repository infrastructure with related AWS resources.
- **[AWS Security Token Service (AWS STS)](https://blowstack.com/tools/cloud-services-hub/aws-security-token-service-(aws-sts))**: CodeArtifact authorization-token generation requires the AWS STS GetServiceBearerToken permission in addition to CodeArtifact permissions. When obtaining a token with an assumed role, its lifetime can be limited to the remaining duration of the role session.
- **[AWS Step Functions](https://blowstack.com/tools/cloud-services-hub/aws-step-functions)**: CodeArtifact APIs can be invoked from AWS Step Functions through AWS SDK integration tasks. A workflow can inspect a package version and copy an approved version between repositories as part of a release process.

## What is AWS CodeArtifact

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

- [Dependency Pinning](https://blowstack.com/tools/cloud-concepts-hub/dependency-pinning): Dependency pinning fixes build dependencies to explicitly selected versions or immutable identifiers so automated builds do not silently consume different inputs.
- [Developer tools](https://blowstack.com/tools/cloud-concepts-hub/developer-tools): Developer tools are software utilities and services that help engineers write, test, debug, package, and deliver applications.
- [Reproducible Builds](https://blowstack.com/tools/cloud-concepts-hub/reproducible-builds): Reproducible builds produce byte-for-byte identical artifacts when the same source code, declared inputs, and build instructions are used.

## AWS CodeArtifact exam questions

Real practice exam questions on AWS CodeArtifact, with the correct answer and its explanation.

### Question 1 (DOP-C02)

**Question:**

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?

**Correct 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.

**Explanation:** 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:

- [DOP-C02](https://blowstack.com/practice-exams/aws-certified-devops-engineer-professional): 9 questions
- [DVA-C02](https://blowstack.com/practice-exams/aws-certified-developer-associate): 1 question

## Learn AWS CodeArtifact in lessons

2 short lessons on AWS CodeArtifact in 1 certification course.

- DOP-C02: AWS CodeArtifact: repository access authorization (Premium), https://app.blowstack.com/lessons/aws-codeartifact-repository-access-authorization-dop-c02
- DOP-C02: AWS CodeArtifact: package repository topology (Premium), https://app.blowstack.com/lessons/aws-codeartifact-package-repository-topology-dop-c02
