Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import boto3
- s3 = boto3.resource('s3')
- bucket = s3.Bucket('<your_bucket>')
- size = 0
- for o in bucket.objects.all():
- if '<your_filter>' in o.key:
- print o, o.size
- size += o.size
- print 's3 size = %.3f GB' % (size/1024/1024/1024)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement