I use AWS Single Sign-ON (SSO) to get programmatic access keys to our various AWS accounts (production, staging, dev, etc) that I can then use on the command line.
I often need to hop between multiple environments so I need to manually add several sets of credentials to my /.aws/credentials file one at a time from the SSO page.
This isn't the biggest problem but is inconvenient/irritating as it takes time; has to be done a few times a day as the tokens expire; and the profile name included on the individual ~/.aws/credentials snippet has to be manually changed to the account name (e.g. [dev]) rather than the account number and SSO identity that AWS includes by default (e.g. [123456789012_AWSReadOnlyAccess]) so it works with our other tools (in this case Terraform workspaces).
I'd like a way to autogenerate user-friendly content for my ~/.aws/credentials easily covering all the SSO accounts I use day to day.
Is there such a facility/tool/script?