0 votes
1 view
by (8.9k points)

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.5k 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

0 votes
1 answer
asked Apr 16 in AWS by Amenda (1.4k points)
0 votes
1 answer
0 votes
1 answer
Welcome to Intellipaat Community. Get your technical queries answered by top developers !


Categories

...