Skip to content

Setting a custom endpoint_url #120

@npezolano

Description

@npezolano

How do I pass a custom endpoint url to s3fs.S3FileSystem ?

I've tried:

kwargs = {'endpoint_url':"https://s3.wasabisys.com",
          'region_name':'us-east-1'}
self.client = s3fs.S3FileSystem(key=AWS_ACCESS_KEY_ID, 
                                secret=AWS_SECRET_ACCESS_KEY,
                                use_ssl=True,
                                **kwargs)

However I get the error:

  File "s3fs/core.py", line 215, in connect
    **self.kwargs)
TypeError: __init__() got an unexpected keyword argument 'endpoint_url'

I've also tried passing kwargs as the parameter config_kwargs and s3_additional_kwargs with similar errors. The problem with these is that endpoint_url gets passed to botocore.Config when it shouldn't.

I can verify boto3 is working with the following:

client = boto3.client("s3",
        aws_access_key_id=AWS_ACCESS_KEY_ID,
        aws_secret_access_key=AWS_SECRET_ACCESS_KEY,
        endpoint_url="https://s3.wasabisys.com",
        use_ssl=True,
        region_name="us-east-1", 
        api_version=None,verify=None, config=None)

fs-s3fs also works

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions