2

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.

Kushan Gunasekera
  • 7,268
  • 6
  • 44
  • 58
Geoff
  • 377
  • 3
  • 13

1 Answers1

0

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')
Marcin
  • 215,873
  • 14
  • 235
  • 294