Amazon s3 如何使用ApacheLibCloud从S3下载文件?

Amazon s3 如何使用ApacheLibCloud从S3下载文件?,amazon-s3,Amazon 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=reg

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

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

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') 
我在代码方面取得了进展

但是BUCKET区域sa-east-1现在为提供者驱动程序抛出错误

'这个桶位于不同的区域。请使用正确的驱动程序。“>

我尝试过使用驱动程序get_driver(Provider.S3_SA_EAST) 但是没有运气。
感谢您的帮助

请编辑问题并在此处添加您的(格式正确的)代码,如果您将其添加为注释,则无法阅读请共享代码编辑的代码。。。。