请求中包含的安全令牌无效

时间:2017-02-08 20:53:41

标签: amazon-web-services credentials

我意识到这个错误很可能是我的凭据,但我在ENV(从.bashrc中导出)和〜/ .aws / credentials文件中都有我的凭据。我已经检查过它们是正确的还是相同的值。

$ python describe_stream.py
Traceback (most recent call last):
  File "describe_stream.py", line 5, in <module>
    response = kinesis.describe_stream('asdfTest')
  File "/Users/asdf/Work/kinesis_test/env/lib/python2.7/site-packages/boto/kinesis/layer1.py", line 247, in describe_stream
    body=json.dumps(params))
  File "/Users/asdf/Work/kinesis_test/env/lib/python2.7/site-packages/boto/kinesis/layer1.py", line 878, in make_request
    body=json_body)
boto.exception.JSONResponseError: JSONResponseError: 400 Bad Request
{u'message': u'The security token included in the request is invalid.', u'__type': u'UnrecognizedClientException'}

$ cat ~/.bashrc
export AWS_ACCESS_KEY_ID=AKIAXXXXXXXXX
export AWS_SECRET_ACCESS_KEY=qccXXXXXXXXXXXX

$ cat ~/.aws/credentials
[default]
aws_access_key_id=AKIAXXXXXXXXXX
aws_secret_access_key=qccXXXXXXXXXXXX

请注意,这刚刚开始发生,过去两天完全相同的凭据。

我在尝试执行的任何与AWS相关的命令上遇到此错误,从Kinesis到S3。

由于

0 个答案:

没有答案