バックアップ自働化してて http://aws.amazon.com/jp/cli/ をはじめて使ってたんだけどなんかアップロードする時にエラー出てた。
$ aws s3 cp a.txt s3://mybucket/
upload failed: a.txt to s3://mybucket/a.txt A client error (PermanentRedirect) occurred when calling the PutObject operation: The bucket you are attempting to access must be addressed using the specified endpoint. Please send all future requests to this endpoint.
こういうの。 --debug
つけるともっと詳細吐く。
どうも aws configure
の時にリージョン設定してないと不正なエンドポイントに接続しにいってこれが起きているっぽい。
再度 aws configure
を打って http://docs.aws.amazon.com/ja_jp/AWSEC2/latest/UserGuide/using-regions-availability-zones.html を参考に ap-northeast-1
を入れた。
aws --region "ap-northeast-1"
でもその場で変えられるっぽい。