This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import boto3 | |
import array | |
s3 = boto3.resource('s3') | |
def lambda_handler(event, context): | |
empty_buckets = []; | |
for bucket in s3.buckets.all(): | |
is_empty = [] == [i for i in bucket.objects.limit(1).all()] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"lastUpload":"2019-07-31T13:46:45.430Z","extensionVersion":"v3.4.1"} |