Using multiple profiles on boto.cfg with pmp-check-aws-rds.py

Hello everybody,
I’m facing a problem with this awesome plugin. I’m trying to use it with multiple AWS accounts with no success.

I have configured boto.cfg with two accounts, [Credentials], [Credentials2]

[Credentials]
aws_access_key_id = KEY
aws_secret_access_key = SECRET

[Credentials2]
aws_access_key_id = KEY
aws_secret_access_key = SECRET

When I launch the script pmp-check-aws-rds.py with the option -n PROFILE, -n Credentials2 it doesn’t work.

ps:

If I use only one account at a time, it works without passing the parameter -n PROFILE.

ex: pmp-check-aws-rds.py -n Credentials2 -r sa-east-1 -l not working with the second profile

If I use only Credentials it works, but i have to switch the file…not cool
pmp-check-aws-rds.py -r sa-east-1 -l works

Could you help regarding this issue?

I really appreciate.

Best Regards.

LuFer

You have to define a profile in the following way:

[profile Credentials2]
aws_access_key_id = KEY
aws_secret_access_key = SECRET

Than pmp-check-aws-rds.py -n Credentials2 … should pick it up.

http://boto.cloudhackers.com/en/latest/boto_config_tut.html#credentials

Thanks, it works like a charm!