TLS Handshake timeout in AWS ECR login

Viewed 23

I'm trying to push docker image from my local machine CMD into AWS ECR. And for that first I'm trying to get the ECR login & password and then piping it into docker login. Below command is giving me error. Please advise.

aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin .dkr.ecr.us-east-1.amazonaws.com

Error - Error response from daemon: Get "https://.dkr.ecr.us-east-1.amazonaws.com/v2/": net/http: TLS handshake timeout

1 Answers

It looks like you're missing the aws_account_id in you URI (which belongs before the dkr.ecr.us-east-1.amazonaws.com part of the command you cite)

aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin <aws_account_id>.dkr.ecr.us-east-1.amazonaws.com

Related