如何使用Apache libcloud从S3下载文件?

我正在使用临时安全凭证(会话令牌)

我收到无效的凭证错误,但凭据均正确(已验证) 请在以下代码中指出我的错误

from libcloud.storage.types import Provider 
from libcloud.storage.providers import get_driver 
cls = get_driver(Provider.S3) 
driver = cls(access_key,secret_key,token=session_token,region=region) 
obj = driver.get_object(container_name='bucket name',object_name='s3 file path with file name') 

我已经完成了代码

但是,存储区sa-east-1现在为提供者驱动程序引发了错误

'此存储桶位于其他区域。请使用正确的驱动程序。'>

我尝试使用驱动程序get_driver(Provider.S3_SA_EAST) 但是没有运气。 任何帮助表示赞赏

guipingex 回答:如何使用Apache libcloud从S3下载文件?

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/3109647.html

大家都在问