The high-level collection s3.buckets.filter(Filters=somefilter)only works for the methods described in the Filters describe_tags(list) section . In this case, you MUST mark your container ( s3.BucketTagging) before you can use a very specific filtering method s3.buckets.filter(Filters=formatted_tag_filter)
( http://boto3.readthedocs.org/en/latest/reference/services/ec2.html#EC2.Client )
IMHO, , - AWS.
s3 = boto3.resource('s3')
for bucket in s3.buckets.all():
if bucket.name.startswith("myapp-"):
print bucket.name
, ( )
(http://boto3.readthedocs.org/en/latest/guide/collections.html)
s3 = boto3.resource('s3')
for bucket in s3.buckets.all():
if bucket.name.startswith("myapp-") :
for obj in bucket.objects.filter(Prefix='/photos'):
print('{0}:{1}'.format(bucket.name, obj.key))
:
ListBuckets, ListObjects HeadObject . S3, .