Search code examples
amazon-web-servicesamazon-ec2aws-cliamazon-ecr

AWS ECR GetAuthorizationToken


I've tried to follow AWS instructions on setting ECR authorization to my user by giving the AmazonEC2ContainerRegistryFullAccess policy to my user.

However when I try to run on my PC the aws ecr get-login I get an error that I don't have permission.

An error occurred (AccessDeniedException) when calling the GetAuthorizationToken operation: User: arn:aws:iam::ACCOUNT_NUMBER:user/MY_USER is not authorized to perform: ecr:GetAuthorizationToken on resource: *

What have I done wrong ?


Solution

  • I've found out that when 2FA is enabled there is no option to use the aws ecr get-login, once I've removed the 2FA from my account I got the authorization token