Search code examples
amazon-web-servicesamazon-s3boto3aws-data-wrangler

How to get python package `awswranger` to accept a custom `endpoint_url`


I'm attempting to use the python package awswrangler to access a non-AWS S3 service.

The AWS Data Wranger docs state that you need to create a boto3.Session() object.

The problem is that the boto3.client() supports setting the endpoint_url, but boto3.Session() does not (docs here).

In my previous uses of boto3 I've always used the client for this reason.

Is there a way to create a boto3.Session() with a custom endpoint_url or otherwise configure awswrangler to accept the custom endpoint?


Solution

  • I finally found the configuration for awswrangler:

    import awswrangler as wr
    
    wr.config.s3_endpoint_url = 'https://custom.endpoint'