I've started using AWS ECR to store my docker images. When I try to authenticate an IAM user, via Powershell (the same happens when I do via AWS command line) I receive a 401:UnAuthorized. If I use the Auth key/secret of the root user, it works and authenticates.
The PowerShell script I use is
(Get-ECRLoginCommand).Password | docker login --username AWS --password-stdin 474389077978.dkr.ecr.eu-west-3.amazonaws.com/myreoi
I've replaced the AWS user with the IAM user. I've also added the IAM user to the admins, but it doesn't seem enough.
Any suggestion? Thanks in advance!