title: Receiving Error "An error occurred (AccessDeniedException) when calling the GetAuthorizationToken operation"
body: <p>Im am currently trying to login to the Amazon ECR using the following command <code>aws ecr get-login --region eu-west-2 --no-include-email</code> and am recieveing the following error;</p>
  
  <p><strong>An error occurred (AccessDeniedException) when calling the GetAuthorizationToken operation: User: arn:aws:iam::************:user/referral is not authorized to perform: ecr:GetAuthorizationToken on resource:</strong></p>
  
  <p>Here is what I have currently tried;</p>
  
  <ul>
  <li>Assinging amazonec2containerregistryfullaccess to both user and group</li>
  <li>2FA disabled</li>
  <li>I also tried to add a <code>Statement</code> within the premissions section of the repo that I had created within Amazon ECR</li>
  </ul>
  
  <p>All the solutions above failed and I am still receieveing the same error, any help on this would be greatly appreciated !</p>