0

I'm playing with boto and trying to get my account balance using FPS. I've exported the AWS access key and secret.

$ env | grep AWS
AWS_SECRET_ACCESS_KEY=xxxxxxxxxxxx  
AWS_ACCESS_KEY_ID=xxxxxxxxxxxx

When I try to connect to ec2 and get all instances, my code works fine. But, when I try to use FPS using python's interactive mode, I get this error:

>>> 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.

What am I doing wrong? Is there a different AWS Access Key I should be using? My AWS access key has admin rights and I have activated IAM for billing. What am I doing wrong?

adele dazim
  • 527
  • 9
  • 20

1 Answers1

2

FPS is not supported by IAM. You have to use the root account or root + MFA.

Services supported by IAM

helloV
  • 50,176
  • 7
  • 137
  • 145
  • 1
    Could you clarify what you mean root account? I need to use my username and password? This page seems to indicate that billing can be access using IAM. What am I missing? http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/control-access-billing.html – adele dazim Nov 30 '14 at 02:38
  • FPS stands for Flexible Payment System that allows developers to accept payments on websites. Is that what you are trying to do? Or you are checking how much you owe AWS? – helloV Nov 30 '14 at 03:04
  • aha. I thought FPS helped me with getting my billing info and stuff. I guess I was wrong. Is that some other interface both provides to get that? – adele dazim Nov 30 '14 at 03:38
  • AWS does not provide APIs to get billing information. [See my response to a similar question here](http://stackoverflow.com/questions/27157080/aws-billing-information-using-aws-java-api/) – helloV Nov 30 '14 at 03:43