s3fs自定义端点网址 [英] s3fs custom endpoint url
本文介绍了s3fs自定义端点网址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何将自定义终结点URL传递给s3fs.S3FileSystem
?
How do I pass a custom endpoint url to s3fs.S3FileSystem
?
我尝试过:
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)
但是我得到了错误:
File "s3fs/core.py", line 215, in connect
**self.kwargs)
TypeError: __init__() got an unexpected keyword argument 'endpoint_url'
我也尝试过将kwargs传递为参数config_kwargs
和s3_additional_kwargs
,并且出现类似的错误.
I've also tried passing kwargs as the parameter config_kwargs
and s3_additional_kwargs
with similar errors.
我可以确认boto3
可以在以下环境下工作:
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)
推荐答案
当前版本client_kwargs={'endpoint_url': 'https:...'}
中有一个未记录的参数,该参数是所需的.
There is an undocumented parameter in the current verison client_kwargs={'endpoint_url': 'https:...'}
which is the desired one.
https://github.com/dask/s3fs/issues/119
这篇关于s3fs自定义端点网址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文