import boto3 client = boto3.client("s3") paginator = client.get_paginator("list_objects_v2") for page in paginator.paginate(Bucket="my-bucket-name"): print(page["Contents"])