I\'ve tried to follow AWS instructions on setting ECR authorization to my user by giving the AmazonEC2ContainerRegistryFullAccess
policy to my user.
However
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
I have the same problem, but I have set the permission boundary
only to s3 previously that causes the issue.
Removed the permission boundary
,it worked like a charm
I had the same problem with ECS when I tried to push my container in the repository.
To solve it, I attached to my IAM role this : AmazonECS_FullAccess
Just as it appears in the error description, I have to allow action "GetAuthorizationToken" in my policy.
{
"Sid": "VisualEditor2",
"Effect": "Allow",
"Action": "ecr:GetAuthorizationToken",
"Resource": "*"
}
Note: This is not my full policy but a subsection of Statement.
This was my guy EC2InstanceProfileForImageBuilderECRContainerBuilds
You must attach a policy to your IAM role.
I attached AmazonEC2ContainerRegistryFullAccess and it worked.