A simple AWS SSO Manager that makes authenticating between multiple profiles, roles, and SSO domains a breeze.
aws-sso-manager
is a simple cli to manage auth for aws sso accounts and roles.
pip3 install awsssomanager
or
poetry add awsssomanager
Create a config file. You can create a config file for each ssoDomain
.
ssoDomain: 'myssodomain' # Your aws sso domain (<sso domain>.awsapps.com)
region: 'us-east-1' # The aws region where your aws sso is configured.
default:
loginAccount: '1234567890' # The default account you want mapped to the profile: default
role_priority:
- "ViewOnlyAccess"
- "PowerUserAccess"
- "PowerUserPlus"
- "AdministratorAccess"
$ aws-sso-manager configure /path/to/config/file
All done!
Whenever your tokens expire, you will need to run the command:
$ aws-sso-manager login
Profiles are automatically generated in the following formats and can be used directly after credentials are acquired:
<account_id>_<role_name>
<account_id>
<account_name>
$ AWS_PROFILE=<proile_name> aws s3 ls
Example
1234567890 = dev
$ AWS_PROFILE=dev aws s3 ls
$ AWS_PROFILE=1234567890 aws s3 ls
$ AWS_PROFILE=1234567890_AdministratorAccess aws s3 ls
AWS_AIOSESSION = AioSession(profile='dev')
AWS_SESSION = Session(profile_name='dev')
I use GitHub Discussions to talk about all sorts of topics related to this repo.
First, check out the existing issues. If you spot something new, open an issue. We'll use the issue to have a conversation about the problem you want to fix, and I'll try to get to it as soon as I can.