📅  最后修改于: 2022-03-11 14:59:07.657000             🧑  作者: Mango
import boto3
def get_folder_size(bucket, prefix):
total_size = 0
for obj in boto3.resource('s3').Bucket(bucket).objects.filter(Prefix=prefix):
total_size += obj.size
return total_size