AWS Containers #3: Image on ECR

In the previous post we saw how to deploy a simple Selenium crawler on ECS. However, the Docker image for the crawler was stored in a Docker Hub repository. Now we’re going to see how to use the AWS Elastic Container Registry (ECR) instead.

  1. Go to the ECR Dashboard.
  2. Press the button.
  3. Select either Private or Public visibility.
  4. Choose a suitable name for the repository.
  5. Press the button.
  6. The newly created repository will appear in the list of repositories. Click the link for the repository.
  7. Press the button.
  8. Follow these instructions to build, tag and push your image.
  9. When you’ve pushed your image it will appear in the list of images in the repository.
  10. You can copy the image URI and use this to update the ECS task.
List of images on ECR.
If you get an `AccessDeniedException` error from the `aws ecr get-login-password` then you might need to use the `--profile` option to specify the name of an AWS profile (specified in `~/.aws/credentials`) which has sufficient privileges.