Skip to main content
ECR secrets provide credentials for pulling container images from AWS Elastic Container Registry. Unlike generic Docker secrets, ECR secrets handle AWS’s token-based authentication automatically, including cross-account access via IAM role assumption.

Use Cases

  • Private ECR Repositories: Pull images from your AWS ECR repositories
  • Cross-Account Access: Access ECR in different AWS accounts
  • Multi-Region Deployments: Pull images from ECR across AWS regions
  • CI/CD Pipelines: Authenticate build systems with ECR
Use ECR secrets instead of Docker secrets for AWS ECR. They handle AWS token refresh automatically and support IAM role assumption for cross-account access.

Configuration Options

FieldDescriptionRequired
accessKeyAWS Access Key IDYes
secretKeyAWS Secret Access KeyYes
reposList of ECR repository URIs to accessYes
roleArnIAM Role ARN for cross-account accessNo
externalIdExternal ID for role assumptionNo

Create an ECR Secret

1

Navigate to Secrets

In the Console, navigate to Secrets and click New, or use the Create dropdown in the top-right corner and select Secret.
2

Enter basic information

Enter a Name and optional Description.
3

Select secret type

Select ECR as the secret type.
4

Configure credentials

Click Data in the left pane. Enter the Access Key and Secret Key. Click Add under Repos to add repository URIs. Optionally enter a Role ARN and External ID for cross-account access.
5

Create the secret

Click Create.

ECR Repository URL Format

ECR repository URLs follow this pattern:
<account-id>.dkr.ecr.<region>.amazonaws.com/<repository-name>
Example:
123456789012.dkr.ecr.us-east-1.amazonaws.com/my-application
Include the full repository path, not just the registry URL. Each repository you need to access should be listed separately.

Using the Secret

After creating the ECR secret, add it as a pull secret to your GVC:
1

Navigate to your GVC

Open your GVC in the Console.
2

Open Pull Secrets

Click Pull Secrets in the left pane.
3

Add the secret

Click Add and select your ECR secret.
4

Save changes

Click Save.

Next Steps