aws Verified current stable Not installed? Package Management

Aws / List Available Domains

List Available Domains

List all available domains in AWS CodeArtifact.

$
Terminal
aws codeartifact list-domains

When To Use

During the initial set-up of a CodeArtifact repository for package management.

Pro Tip

Use filters to narrow down domain searches; monitor for data consistency across repositories.

Terminal Output

Expected runtime feedback

Simulated preview
>
Output
┌──────────────────────────┬─────────────────────┐
│ Domain Name              │ Domain ARN          │
├──────────────────────────┼─────────────────────┤
│ example-domain-1         │ arn:aws:explore:...│
│ example-domain-2         │ arn:aws:explore:...│
└──────────────────────────┴─────────────────────┘

Anatomy of Output

Understanding the result

Domain Name: my-domain, ARN: arn:aws:codeartifact:us-west-2:123456789012:domain/my-domain Domain Entry

Indicates the domain found and its ARN.

Status: Active Domain Status

Verifies that the domain is active.

Created on: 2021-05-01T12:00:00Z Creation Timestamp

Lists the creation date for reference.

Power User Variants

Optimized versions

aws codeartifact list-domains --region us-east-1

List domains specifically in the 'us-east-1' region.

aws codeartifact list-domains --format json

Retrieve domain list output in JSON format.

Troubleshooting

Common pitfalls

Access denied for listing domains

Solution: Ensure appropriate IAM permissions for AWS CodeArtifact are granted.

No domains found

Solution: Double-check the region and account to ensure your domains exist.

Unable to communicate with AWS CodeArtifact service

Solution: Verify network connectivity and ensure AWS services are operational.

Command Breakdown

What each part is doing

aws
Base Command
The executable that performs this operation. Here it runs Aws before the shell applies any redirect operators.

How To Run

Execution path

  1. Step 1

    Open your terminal and execute: aws codeartifact list-domains

  2. Step 2

    Review the output for a list of available domains.

Alternative Approaches

Comparable commands in other tools

Alternative package management tools for the same job.