4 ms·
It sounds like an annoying limitation of the API that (apparently?) you can't cheaply validate whether a bucket exists. Two manual work-arounds that come to mi
by sltkr 13y ago
It sounds like an annoying limitation of the API that (apparently?) you can't cheaply validate whether a bucket exists.
Two manual work-arounds that come to mind:
- store a list of created buckets as keys in another bucket.
- store a dummy file in each bucket you create.
Either method allows you to check the existence of the bucket with a GET request rather than a more expensive LIST request, but both are hackish. It seems like this is functionality S3 should already provide cheaply.
- masklinn 13y ago> It sounds like an annoying limitation of the API that (apparently?) you can't cheaply validate whether a bucket exists. It looks like there now is: http://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketHEAD.html http://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketHEA... I'm guessing (hoping?) that didn't exist back when the feature was added to Boto, 7 years ago: https://github.com/boto/boto/commit/8410c365ee0120e073bf00bdc9b913a0575d54f7 https://github.com/boto/boto/commit/8410c365ee0120e073bf00bd...