Saad Ahmed
Saad Ahmed

Reputation: 61

Unable to push docker image to AWS ECR Private Repository - Retrying Error in 5,4,3,2,1 seconds and fails

I have access to AWS root account and I am unable to push the docker image to AWS ECR. Following are the steps that I take

  1. Create a repository in AWS ECR called zestbot
  2. Execute sudo aws ecr get-login-password --region eu-west-2 | sudo docker login --username AWS --password-stdin xxxxxxx.dkr.ecr.eu-west-2.amazonaws.com I get a login succceded message
  3. sudo docker build -t zestbot . Docker image is successfully created.
  4. sudo docker tag zestbot:latest 712324675515.dkr.ecr.eu-west-2.amazonaws.com/zestbot:latest
  5. 'sudo docker push 712324675515.dkr.ecr.eu-west-2.amazonaws.com/zestbot:latest' however now I get the following message
The push refers to repository [xxxxxxxxxxx.dkr.ecr.eu-west-2.amazonaws.com/zestbot]
5d5cd7130da3: Retrying in 1 second 
9f416effab09: Retrying in 1 second 
ee4b900269d2: Retrying in 1 second 
dd0bdbc3fde8: Retrying in 1 second 
db0100763d2e: Retrying in 1 second 
a84e7880554c: Waiting 
58fea184de16: Waiting 
2d244e0816c6: Waiting 
b71a8d532c76: Waiting 
11dceb280a9d: Waiting 
9e50b5c2a61f: Waiting 
EOF

I have checked related issues on stackoverflow and I am not sure why can I push the image. The AWS CLI is configured correctly and I am even able to fetch the repositories using the CLI and also create a ECR REPO using the CLI. I have also tried creating a IAM User with 'AmazonEC2ContainerRegistryFullAccess" permissions and re-configured my cli but the problem persists.

Root user has access to all the resources therefore permissions should'nt be a problem. Any suggestions?

Upvotes: 3

Views: 470

Answers (1)

jia luo
jia luo

Reputation: 1

Did you define multi profiles in your aws cli credentials file and use the one which is not the [default] to complete the aws configure? if so, you may try to override your credentials and exchange it as the default profile, and retry the process.

Upvotes: 0

Related Questions