Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create bucket if it does not exist? #23

Open
limx0 opened this issue Feb 12, 2018 · 5 comments
Open

Create bucket if it does not exist? #23

limx0 opened this issue Feb 12, 2018 · 5 comments

Comments

@limx0
Copy link

limx0 commented Feb 12, 2018

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

@willmcgugan
Copy link
Member

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

@Ryanb58
Copy link

Ryanb58 commented Apr 27, 2018

Creating a bucket would be a nice feature...

@geoffjukes
Copy link
Contributor

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

@willmcgugan
Copy link
Member

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

@geoffjukes
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants