How can I check that a AWS S3 bucket exists?
问题 Simple question here? ... How can I check with boto that a AWS bucket exists? ... preferably by providing the path? ... here is the approach I feel like taking: def bucket_exists(self, bucket_name): connection = boto.s3.connection.S3Connection('<aws access key>', '<aws secret key>') buckets = connection.get_all_buckets() for bucket in buckets: bucket_name = bucket.name # Bucket existence logic here # submit boto request ie:. exists = boto.get_bucket(bucket_name, validate=True) if exists: