Amazon Elastic Container Registry (ECR)

Storing container images in Amazon ECR.

The AWS container registry is a container registry flavor provided with the ZenML aws integration and uses Amazon ECR to store container images.

When to use it

You should use the AWS container registry if:

one or more components of your stack need to pull or push container images.

you have access to AWS ECR. If you're not using AWS, take a look at the other container registry flavors.

How to deploy it

The ECR registry is automatically activated once you create an AWS account. However, you'll need to create a Repository in order to push container images to it:

Go to the ECR website.

Make sure the correct region is selected on the top right.

Click on Create repository.

Create a private repository. The name of the repository depends on the [orchestrator] (../orchestrators/orchestrators.md or step operator you're using in your stack.

URI format

The AWS container registry URI should have the following format:

<ACCOUNT_ID>.dkr.ecr.<REGION>.amazonaws.com

# Examples:

123456789.dkr.ecr.eu-west-2.amazonaws.com

987654321.dkr.ecr.ap-south-1.amazonaws.com

135792468.dkr.ecr.af-south-1.amazonaws.com

To figure out the URI for your registry:

Go to the AWS console and click on your user account in the top right to see the Account ID.

Go here and choose the region in which you would like to store your container images. Make sure to choose a nearby region for faster access.

Once you have both these values, fill in the values in this template <ACCOUNT_ID>.dkr.ecr.<REGION>.amazonaws.com to get your container registry URI.

Infrastructure Deployment

An AWS ECR Container Registry can be deployed directly from the ZenML CLI:

zenml container-registry deploy ecr_container_registry --flavor=aws --provider=aws ...