Skip to main content

expansions/list_s3_objects.py

1def list_s3_objects(sess: boto3.Session, **kwargs):
2 s3 = sess.client("s3")
4 for page in s3.get_paginator("list_objects_v2").paginate(**kwargs):
5 yield from page.get("Contents", [])