Need to easily assume AWS IAM roles? Mr. M has your back!
Features:
- Assume IAM roles
- Spawn a bash shell with preconfigured environment variables for the new role
- Open the AWS web console for an assumed role
- Supports cross-account roles
- Supports multi-factor authentication
If you use Kubernetes, also check out Robusta
Installation:
pip install git+https://github.com/robusta-dev/mr-m
Assume a role and open a preconfigured bash-shell:
mr-m shell \
--clean \
--role-arn="arn:aws:iam::RoleGoesHere" \
--external-id="external-id-goes-here" \
--mfa-serial="arn:aws:iam::mfa-arn-goes-here" \
--mfa-token=<MFA_TOKEN>
Assume a role and generate a link for logging in to the AWS Web Console with that role
mr-m web \
--role-arn="arn:aws:iam::RoleGoesHere" \
--external-id="external-id-goes-here" \
--mfa-serial="arn:aws:iam::mfa-arn-goes-here" \
--mfa-token=<MFA_TOKEN>
When I was in fifth grade I had a teacher named Mr. M. He was a wonderful teacher, but all I remember from his classes is one sentence he said often:
You should never assume, because when you assume you make an ASS of U and ME.
I assume that Mr. M taught me many other things, but this is all I remember from fifth grade.