If I understand your question correctly you are not adding the Access ID and secret access key for the right user or the user that you are using it's credentials doesn't have the right access to communicate with the ECR, you can try with the admin or create a user that have admin rights and try to see if you will get the same error.