aws-cli icon indicating copy to clipboard operation
aws-cli copied to clipboard

aws-cli v2 ecr-login results with 400 Bad Request

Open johnny-fuse opened this issue 5 years ago • 2 comments

aws-cli v2 ecr-login not working

According to the documentation I am trying to run:

docker run -e AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID -e AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY -e AWS_REGION=$AWS_REGION --rm -it amazon/aws-cli:latest --region $AWS_REGION ecr get-login-password \
          | docker login \
              --username AWS \
              --password-stdin 816841120843.dkr.ecr.$AWS_REGION.amazonaws.com

All environment variables are configured correctly, and still getting:

Error response from daemon: login attempt to https://816841120843.dkr.ecr.us-east-2.amazonaws.com/v2/ failed with status: 400 Bad Request

Platform/OS/Hardware/Device Mac/CircleCI agent

johnny-fuse avatar Feb 17 '21 22:02 johnny-fuse

Hi @johnny-fuse,

Thanks for writing in! I think this may be a duplicate of #4962. I'd have a look there to see if you find any useful info. Let us know either way—If not, we'll be happy to look into this further!

stobrien89 avatar Feb 18 '21 20:02 stobrien89

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see. If you need more assistance, please open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.

github-actions[bot] avatar Feb 24 '21 00:02 github-actions[bot]