Click here to Skip to main content
15,910,303 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
I am unable to list the AWS ECR repositories through boto3 script. Can anyone help on the this issue.

What I have tried:

import boto3

client = boto3.client('ecr')

response = client.describe_repositories(
registryId='string',
repositoryNames=[
'',
],
nextToken='string',
maxResults=10
)
Posted
Updated 3-Dec-20 23:53pm

1 solution

If that is really your script then you are looking for a repository with registryId "string" - I doubt that there are any repositories called that. You also want a repository with a blank name, and a previous call has returned a nextToken of "string" - I doubt that too.

When you get scripts from the documentation at ECR — Boto3 Docs 1.16.29 documentation[^] it's a good idea to look at the examples at the bottom of the section, not just the syntax definition.

Try just using the defaults for all of the parameters and build up your script from there - I suggest starting with
import boto3
client = boto3.client('ecr')
response = client.describe_repositories()
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900