Using CMD line to connect to AWS's ECR

Continuing the discussion from Using AWS's ECR get-login-password and --password-stdin with Powershell:

Hello, I really appreciate the info on ECR, however being a complete newbie to Docker and AWS CLI, I’d like to ask if in the command listed “$password = aws ecr get-login-password --region region; docker login --username AWS --password $password account-number.dkr.ecr.region.amazonaws.com” am I changing username to my Docker Acct username or my IAM username created for Docker access and similarly with the password?

You should always consult the service documentation first, before trying to puzzle things together from second or third hand resources:

The aws cli will create a token using the aws cli profile you specify. With docker login, the username is identical for everyone, the password is the token created by the aws-cli command, and the registry needs to use your account number and the region where your images are located.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.