簡體   English   中英

使用Boto連接到FPS獲取帳戶余額

[英]Using Boto to connect to FPS to get account balance

我正在玩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進行計費。 我究竟做錯了什么?

IAM不支持FPS。 您必須使用root帳戶或root + MFA。

IAM支持的服務

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM