Can't login to docker with aws

This is an extension of my last question considering I’ve decided to deploy a Docker container onto a ton of EC2’s. I’ve set up a repository and a user with full rights, and I added the correct keys to my aws cli configuration. When I try to run the docker login command that comes up after running the “aws ecr get-login” command, it gives me a failed with status: 403 forbidden error. I have absolutely no clue what’s going on, and I’ve spent the past 2 days trying to fix this error… Any ideas?

enter image description here

  • Dockerrun.aws.json structure for ECR Repo
  • Docker push to AWS ECR private repo failing with malformed JSON
  • How do I set the AWS Autoscaler to use the same IP addresses?
  • Best practice using ALB
  • AWS Discovery only tries 3 ports 5701, 5702 & 5703 while joining cluster
  • AWS codebuild not passing down environment variables?
  • How to upgrade docker container after its image changed
  • Are parallel Docker contexts possible?
  • remote control nginx configuration
  • Overwrite nginx html directory in Docker compose configuration
  • What is inside a Docker Ubuntu Image if Docker doesn't encapsulate an OS?
  • Docker for Mac: Hostname setup for container
  • One Solution collect form web for “Can't login to docker with aws”

    I would suggest to check the security group of the EC2 Instance

    To allow access via SSH you have to apply the following settings for the Security Group of the EC2 Instance:

    Security Groups

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.