Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in AWS by (12.9k points)
recategorized by

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?

1 Answer

0 votes
by (18.2k points)
Firstly, you have to make sure that you have attached the policy to your IAM role.

Also, check if your F2A is enabled or not. If it is enabled then you won't get any option to use the aws ecr get-login, so you'll have to remove the 2FA from your account and you will get the authorization token.

Related questions

Want to get 50% Hike on your Salary?

Learn how we helped 50,000+ professionals like you !

0 votes
1 answer
asked Apr 16, 2020 in AWS by Amenda (1.4k points)
0 votes
1 answer
0 votes
1 answer
asked Apr 9, 2020 in AWS by Amenda (1.4k points)

31k questions

32.9k answers

507 comments

693 users

...