我正在玩boto并尝试使用FPS获取帐户余额。我已导出AWS访问密钥和密码。
$ env | grep AWS
AWS_SECRET_ACCESS_KEY=xxxxxxxxxxxx
AWS_ACCESS_KEY_ID=xxxxxxxxxxxx
当我尝试连接到ec2并获取所有实例时,我的代码工作正常。但是,当我尝试使用python的交互模式使用FPS时,我收到此错误:
>>> import boto
>>> fc=boto.connect_fps('fps.amazonaws.com')
>>> fc.get_account_balance()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Library/Python/2.7/site-packages/boto/fps/connection.py", line 95, in wrapper
return func(self, action, response, *args, **kw)
File "/Library/Python/2.7/site-packages/boto/fps/connection.py", line 183, in get_account_balance
return self.get_object(action, {}, response)
File "/Library/Python/2.7/site-packages/boto/connection.py", line 1204, in get_object
raise self.ResponseError(response.status, response.reason, body)
boto.fps.exception.InvalidClientTokenId: FPS Response Error: 403 InvalidClientTokenId
The AWS Access Key Id you provided does not exist in our records.
The AWS Access Key Id you provided does not exist in our records.
我做错了什么?我应该使用不同的AWS Access Key吗?我的AWS访问密钥具有管理员权限,我已激活IAM进行计费。我做错了什么?