我想從我的亞馬遜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