1import boto3
2client = boto3.client('s3')
3paginator = client.get_paginator('list_objects')
4for result in paginator.paginate(Bucket='edsu-test-bucket', Delimiter='/'):
5 for prefix in result.get('CommonPrefixes'):
6 print(prefix.get('Prefix'))