s3fs
s3fs copied to clipboard
Create bucket if it does not exist?
I'm currently trying to use s3fs with minio, but running into trouble when a bucket does not exist.
I'm wondering whether this is expected to work (with s3) or if I should just add some code to create a bucket before connecting with s3fs. I don't have any s3 buckets to test against unfortunately.
Cheers
It's expected that the bucket already exists, before you open the filesystem. That said, a way of creating a bucket with S3FS is not a bad idea...
Creating a bucket would be a nice feature...
I'm not sure I agree. I use the FS-URLs a lot, an in that format, the bucket falls into the 'host' portion of the URL, and therefore it makes sense that it should already exist.
My concern with auto-creating buckets, is that it could lead to 'working' code that is writing data to the wrong place (a Typo in the bucket name, for example).
@geoffjukes I concur that it would be unwise to auto-create buckets.
If it is to be added, it should be made explicit. Perhaps a constructor boolean and a query argument on the FS URL?
As create already exists (and pertains to the 'directory') and is 'on' by default, maybe create_bucket?