s3fs icon indicating copy to clipboard operation
s3fs copied to clipboard

Create bucket if it does not exist?

Open limx0 opened this issue 7 years ago • 5 comments
trafficstars

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

limx0 avatar Feb 12 '18 00:02 limx0

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...

willmcgugan avatar Feb 21 '18 13:02 willmcgugan

Creating a bucket would be a nice feature...

Ryanb58 avatar Apr 27 '18 15:04 Ryanb58

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 avatar Jun 25 '18 17:06 geoffjukes

@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?

willmcgugan avatar Jun 25 '18 17:06 willmcgugan

As create already exists (and pertains to the 'directory') and is 'on' by default, maybe create_bucket?

geoffjukes avatar Jun 25 '18 18:06 geoffjukes