Getting started with Container registry

Create a repository, log in with docker, push an image, read its scan, and delete it all again.

Last updated 18 November 2026View as Markdown

You need Docker on a Linux or macOS machine and an image to push. Replace org-example1234.ecr.example.com with your registry host (the console shows it as Image URI on the repository's page) and my-app with the repository name. In the CLI steps, repository-id is the id the create command answers with, and manifest-id is the image's manifest.id in the image list.

Prerequisites

  • ecr:CreateRepository, ecr:GetAuthorizationToken, ecr:PushImage, ecr:PullImage, ecr:DescribeRepositories, ecr:ListImages, ecr:GetScanResults and ecr:DeleteRepository. The AdministratorAccess policy has all of them.

Step 1: Create a repository

  1. Open Container registry, then choose Create image repository.
  2. For Repository name, enter my-app.
  3. Choose Create image repository.

The repository's page opens on its Images tab.

Step 2: Log in

  1. On the repository's page, open the Push commands tab.
  2. Choose Generate a login token.
  3. Run the docker login command it shows, and paste the token at the Password: prompt.

Step 3: Push and pull

docker tag my-image:latest org-example1234.ecr.example.com/my-app:v1.2.0
docker push org-example1234.ecr.example.com/my-app:v1.2.0
docker pull org-example1234.ecr.example.com/my-app:v1.2.0

You pay for the stored layers from now on.

Step 4: Read the scan

A pushed image is scanned on its own.

  1. Open the Images tab. The Vulnerabilities column shows Scanning while the scan runs, then the worst severity found or Clean.
  2. Choose the result to open the scan report.

Clean up

Deleting the repository deletes its images.

  1. On the repository's page, open the Danger zone tab.
  2. Choose Delete repository, type the repository's name, then choose Delete repository.

Next steps

Did this page help you?