更新时间:2023-11-27 08:58:34
请尝试以下代码
folders = bucket.list("","/")
for folder in folders:
print (folder.name)
PS 参考 URL(如何使用 python 脚本将文件从一个存储桶复制到 Amazon S3 上的另一个存储桶)
PS reference URL(How to use python script to copy files from one bucket to another bucket at the Amazon S3 with boto)