I'm trying to use the ecr-public client but I get similar errors when I execute any method.
import boto3
client=boto3.client('ecr-public')
client.get_authorization_token()
error: botocore.exceptions.ClientError: An error occurred (InternalFailure) when calling the GetAuthorizationToken operation (reached max retries: 4):
client.create_repository(repositoryName="test-project")
error: botocore.exceptions.ClientError: An error occurred (InternalFailure) when calling the CreateRepository operation (reached max retries: 4):
My user has full AWS admin permissions and if I change from client type ecr-public to ecr, it works.
Based on the comments.
ecr-publiccan only be used inus-east-1region. Thus you have to set yourclientfor that region: