Using CMD line to connect to AWS's ECR

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.