📅  最后修改于: 2022-03-11 14:48:30.678000             🧑  作者: Mango
import boto3
client = boto3.client('s3')
paginator = client.get_paginator('list_objects')
for result in paginator.paginate(Bucket='edsu-test-bucket', Delimiter='/'):
for prefix in result.get('CommonPrefixes'):
print(prefix.get('Prefix'))