Skip to content

Create bucket if it does not exist? #23

Description

@limx0

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

Activity

  1. willmcgugan commented on Feb 21, 2018

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

  2. Ryanb58 commented on Apr 27, 2018

    @Ryanb58

    Creating a bucket would be a nice feature...

  3. geoffjukes commented on Jun 25, 2018

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

  4. willmcgugan commented on Jun 25, 2018

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

  5. geoffjukes commented on Jun 25, 2018

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions