更新时间:2022-11-06 20:01:16
下载文件时,您还需要传递存储区.尝试使用CLI配置region
或在创建客户端时通过region_name
.
You'll need to pass the bucket region as well when downloading the file. Try configuring region
using the CLI or pass region_name
when creating the client.
s3 = boto3.client('s3',
aws_access_key_id=ACCESS_KEY_ID,
aws_secret_access_key=ACCESS_KEY,
region_name=AWS_REGION)
https://boto3.amazonaws.com/v1/documentation/api/latest/guide/quickstart.html