Skip to content

Instantly share code, notes, and snippets.

def gather_pages(func, *args, **kwargs):
result = func(*args, **kwargs)
yield result
while 'nextToken' in result:
result = func(*args, kwargs, nextToken=result['nextToken'])
yield result
def describe_all_images(registry_id, repository_name):
client = boto3.client('ecr')
return [image