aws-codeartifact
Interact with AWS CodeArtifact repositories
TLDR
List available domains for your AWS account
Generate credentials for a specific package manager
Get the endpoint URL of a CodeArtifact repository
Display help
Display help for a specific subcommand
SYNOPSIS
aws codeartifact subcommand [options]
Examples:
aws codeartifact create-domain --domain my-domain --encryption-key arn:aws:kms:us-east-1:123456789012:key/my-key
aws codeartifact get-authorization-token --domain my-domain --query authorizationToken --output text
PARAMETERS
create-domain
Creates a CodeArtifact domain.
delete-domain
Deletes a CodeArtifact domain.
list-domains
Lists all CodeArtifact domains in the account.
create-repository
Creates a repository within a domain.
delete-repository
Deletes a CodeArtifact repository.
list-repositories
Lists repositories within a CodeArtifact domain.
get-authorization-token
Generates a temporary authentication token for package managers.
list-packages
Lists packages in a specified repository.
list-package-versions
Lists versions for a specific package.
copy-package-versions
Copies package versions between repositories.
update-package-versions-status
Updates the status (e.g., Published, Archived, Deleted) of package versions.
get-repository-endpoint
Retrieves the endpoint URL for a specific repository.
describe-domain
Provides detailed information about a CodeArtifact domain.
describe-repository
Provides detailed information about a CodeArtifact repository.
describe-package-version
Provides detailed information about a specific package version.
put-domain-permissions-policy
Attaches a resource policy to a CodeArtifact domain.
put-repository-permissions-policy
Attaches a resource policy to a CodeArtifact repository.
DESCRIPTION
The aws-codeartifact command is a subcommand of the AWS Command Line Interface (CLI) that provides direct interaction with the AWS CodeArtifact service. It allows users to programmatically manage various aspects of their CodeArtifact resources, including creating and managing domains and repositories, administering package versions, generating authentication tokens for package managers, and configuring access policies.
This tool is essential for automating build and deployment pipelines that involve artifact management within AWS environments, enabling secure and scalable storage and retrieval of software dependencies and outputs. It integrates seamlessly with popular package managers like npm, pip, Maven, and NuGet, streamlining the development workflow by providing a central, secure repository for all software artifacts, enhancing software supply chain security and compliance.
CAVEATS
Requires AWS CLI installation and proper IAM configuration with necessary permissions.
Authentication tokens from get-authorization-token are temporary (default 12 hours) and need periodic renewal.
Operations are region-specific; ensure the correct AWS region is configured.
Usage incurs costs for storage and data transfer within CodeArtifact.
Access control relies heavily on IAM and resource policies, requiring careful management.
<B>AUTHENTICATION WITH PACKAGE MANAGERS</B>
To use CodeArtifact with package managers (npm, pip, Maven, NuGet), first obtain an authentication token using the get-authorization-token subcommand. This token is then configured with your package manager to allow publishing or consuming packages from CodeArtifact repositories.
<B>DOMAINS AND REPOSITORIES STRUCTURE</B>
CodeArtifact organizes packages within domains, which are logical groupings of repositories. Each domain has an associated Amazon S3 bucket for storage. Repositories reside within domains and are where packages are actually stored. This structure allows for granular control over access and retention.
<B>UPSTREAMS AND EXTERNAL CONNECTIONS</B>
Repositories can be configured with upstreams to fetch packages from other CodeArtifact repositories within the same domain or from public registries. External connections allow repositories to connect to specific public registries, caching packages on demand and ensuring consistent access to public dependencies.
HISTORY
AWS CodeArtifact was launched by Amazon Web Services in June 2020. Its development aimed to provide a fully managed artifact repository service, addressing the need for secure, scalable, and centralized storage for software packages within cloud-native development workflows. Before CodeArtifact, developers often used third-party or self-hosted artifact managers. CodeArtifact simplifies artifact management, integrates seamlessly with existing AWS services and popular package managers, and offers enterprise-grade security and governance for software supply chains.