I am simply trying to pull an image from ECR public repository, however is not working:
docker pull public.ecr.aws/bitnami/golang:1.15
I get this error:
pull access denied for public.ecr.aws/bitnami/golang, repository does not exist or may require 'docker login': denied: Your authorization token has expired. Reauthenticate and try again.
Why "Access denied"? It is a public repository: https://gallery.ecr.aws/bitnami/golang
According to this it is not needed: https://aws.amazon.com/ecr/faqs/#:~:text=Anyone%20with%20or%20without%20an,as%20helm%20charts%20for%20Kubernetes.
Something similar happened to me as well, though for a different image.
In my case, I had previously published an image to one of my own ECR public repositories many months ago. The token/signin I had used to do this had long ago expired, but the docker pull command was still referencing it, hence the "Your authorization token has expired" messaging.
The solution was to simply run "docker logout public.ecr.aws"