Amazon ECR
User Guide (API Version 2015-09-21)

Pushing an Image

If you have a Docker image available in your development environment, you can push it to an Amazon ECR repository with the docker push command.


Amazon ECR users require permissions to call ecr:GetAuthorizationToken before they can authenticate to a registry and push or pull any images from any Amazon ECR repository. Amazon ECR provides several managed policies to control user access at varying levels; for more information, see Amazon ECR Managed Policies.

To push a Docker image to an Amazon ECR repository

  1. Authenticate your Docker client to the Amazon ECR registry to which you intend to push your image. Authentication tokens must be obtained for each registry used, and the tokens are valid for 12 hours. For more information, see Registry Authentication.

  2. If your image repository does not exist in the registry you intend to push to yet, create it. For more information, see Creating a Repository.

  3. Identify the image to push. Run the docker images command to list the images on your system.

    docker images

    You can identify an image with the repository:tag value or the image ID in the resulting command output.

  4. Tag your image with the Amazon ECR registry, repository, and optional image tag name combination to use. The registry format is The repository name should match the repository that you created for your image. If you omit the image tag, we assume that the tag is latest.

    The following example tags an image with the ID e9ae3c220b23 as

    docker tag e9ae3c220b23
  5. Push the image using the docker push command:

    docker push
  6. (Optional) Apply any additional tags to your image and push those tags to Amazon ECR by repeating Step 4 and Step 5. You can apply up to 100 tags per image in Amazon ECR.