def get_s3_keys(bucket): """Get a list of keys in an S3 bucket.""" keys = [] resp = s3.list_objects_v2(Bucket=bucket) for obj in resp['Contents']: keys.append(obj['Key']) return keys