Skip to main content

AWS Elastic Container Registry (ECR)

🔐 Setup Required

The ecr registry module lets you authenticate against private AWS Elastic Container Registry (ECR) repositories.


⚙️ Configuration Variables

WUD_REGISTRY_ECR_{registry_name}_ACCESSKEYID
Requiredstring

AWS IAM Access Key ID

Allowed values:[AWS Access Key ID](https://docs.aws.amazon.com/general/latest/gr/aws-sec-cred-types.html)
WUD_REGISTRY_ECR_{registry_name}_REGION
Requiredstring

AWS Region Code

Allowed values:[AWS Region Code](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints) (e.g. `us-east-1`, `eu-west-1`)
WUD_REGISTRY_ECR_{registry_name}_SECRETACCESSKEY
Requiredstring

AWS IAM Secret Access Key

Allowed values:[AWS Secret Access Key](https://docs.aws.amazon.com/general/latest/gr/aws-sec-cred-types.html)
WUD_REGISTRY_ECR_{registry_name}_ACCOUNTID
Optionalstringdefault: Derived from image name

AWS Account ID (used to filter when multiple accounts are configured)

Allowed values:12-digit numeric string
WUD_REGISTRY_ECR_{registry_name}_PUBLIC
Optionalbooleandefault: false

Whether the registry is an ECR Public gallery

Required IAM Policy

Ensure the AmazonEC2ContainerRegistryReadOnly policy (or equivalent ecr:GetAuthorizationToken, ecr:BatchGetImage, ecr:GetDownloadUrlForLayer permissions) is attached to the IAM user.


🚀 Examples

Authenticate with Private AWS ECR

services:
whatsupdocker:
image: getwud/wud
environment:
- WUD_REGISTRY_ECR_PRIVATE_ACCESSKEYID=AKIAIOSFODNN7EXAMPLE
- WUD_REGISTRY_ECR_PRIVATE_SECRETACCESSKEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
- WUD_REGISTRY_ECR_PRIVATE_REGION=eu-west-1

📖 Setup Guide: Creating an AWS IAM User for ECR

1. Create an IAM User

Open the AWS IAM Console and create a new IAM user.

image

2. Attach the Read-Only Policy

Attach the AmazonEC2ContainerRegistryReadOnly managed policy to the user.

image

3. Generate Access Keys

Create an Access Key under Security credentials, and copy the Access Key ID and Secret Access Key.

image