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-public
can only be used in us-east-1
region. Thus you have to set your client
for that region:
client=boto3.client('ecr-public', region_name='us-east-1')