我想从我的亚马逊s3存储桶之一下载文件到Ubuntu EC2 instance.I在两个不同区域创建了两个存储桶,我可以从一个区域的存储桶访问和下载文件,但是当我尝试访问其他人面临的问题。aws s3下载文件
Here is the error,
Traceback (most recent call last):
File "listbucket.py", line 7, in <module>
bucket = conn.get_bucket('train-faces')
File "/usr/local/lib/python2.7/dist-packages/boto/s3/connection.py", line 509, in get_bucket
return self.head_bucket(bucket_name, headers=headers)
File "/usr/local/lib/python2.7/dist-packages/boto/s3/connection.py", line 556, in head_bucket
response.status, response.reason, body)
boto.exception.S3ResponseError: S3ResponseError: 400 Bad Request
但我可以从另一个区域的桶下载文件。
当你设置你的AWS凭证你应该设置默认区域。这可能是为什么它为一个而不是另一个工作。你在命令中指定区域吗?例如。 --region us-east-1 – slipperyseal
没有iam没有在命令中指定任何区域,但我已配置区域。 – Raj
但如果我改变任何其他地区的配置其不工作 – Raj