broamski / aws-mfa

Manage AWS MFA Security Credentials
MIT License
1.02k stars 165 forks source link

Shortcut to iterate over all profiles for mfa #28

Open StarryShark opened 6 years ago

StarryShark commented 6 years ago

It would be nice to have an option to iterate over all the profiles for MFA instead of typing the command again and again.

jcolfej commented 6 years ago

The problem is that AWS invalidate MFA code for each code used ... So with one code, you can't do multiple request ...

StarryShark commented 6 years ago

@jcolfej We deal with multiple AWS accounts on a daily basis, and currently we don't have SSO setup so everyday first thing in the morning I do following,

$ aws-mfa --profile aws1
<token1>
$ aws-mfa --profile aws2
<token2>
$ aws-mfa --profile aws3
<token3>
$ aws-mfa --profile aws4
<token4>

Instead, it would be helpful if there is an option something like,

$ aws-mfa --all-profiles
Token for profile aws1: <token1>
Token for profile aws2: <token2>
Token for profile aws3: <token3>
Token for profile aws4: <token4>