s3cmd
epel-testing
次を実行してレポからインストールされました:
yum --enablerepo epel-testing install s3cmd
次に、構成ツールを呼び出しましたが、次のs3cmd --configure
エラーが発生しました。
Test access with supplied credentials? [Y/n]
Please wait, attempting to list all buckets...
ERROR: Test failed: 400 (InvalidToken): The provided token is malformed or otherwise invalid.
Invoked as: /usr/bin/s3cmd --configureProblem: AttributeError: 'S3Error' object has no attribute 'find'
S3cmd: 1.5.0-beta1
python: 2.6.8 (unknown, Mar 14 2013, 09:31:22)
[GCC 4.6.2 20111027 (Red Hat 4.6.2-2)]
Traceback (most recent call last):
File "/usr/bin/s3cmd", line 2323, in <module>
main()
File "/usr/bin/s3cmd", line 2221, in main
run_configure(options.config, args)
File "/usr/bin/s3cmd", line 1704, in run_configure
if e.find('403') != -1:
AttributeError: 'S3Error' object has no attribute 'find'
キーが正しいと確信しています。
これについて何か考えはありますか?
UPDATE 金 3 月 21 日 22:44:42 ICT 2014
デバッグモードで実行中にいくつかの手がかりが見つかりました。
稼働中のシステムで、同じ資格情報を使用して、次のようにします。
DEBUG: SignHeaders: 'GET\n\n\n\nx-amz-date:Fri, 21 Mar 2014 07:07:18 +0000\n/'
障害が発生したシステムで:
DEBUG: SignHeaders: 'GET\n\n\n\nx-amz-date:Fri, 21 Mar 2014 07:40:56 +0000\nx-amz-security-token:AQoDYXdzENb...\n/'
このセキュリティ トークンは、メタデータから取得されました。
# wget -O - -q 'http://169.254.169.254/latest/meta-data/iam/security-credentials/myrole'
{
"Code" : "Success",
"LastUpdated" : "2014-03-21T12:45:27Z",
"Type" : "AWS-HMAC",
"AccessKeyId" : "foo",
"SecretAccessKey" : "bar",
"Token" : "AQoDYXdzENb....",
"Expiration" : "2014-03-21T19:18:02Z"
}
したがって、私の質問は次のように変更する必要があります。実行時にヘッダーにs3cmd
追加されることがあるのはなぜですか(私は使用していません)?x-amz-security-token
--configure
--add-header