A tool to print out AWS account and identity information to verify which account/organization is currently in use.
Whereas aws sts get-caller-identity
only prints the account number,
aws-account resovled the account id to the actual account name via calling
aws sso list-accounts --access-token ...
(i.e. the python boto3 equivalent)
when the identity is an 'assumed role' with a SSO login.
This is meant to be especially helpful when working with multiple AWS accounts e.g. within an AWS Organization and/or across organizations.
Recommended to install via pipx
pipx install aws-account
Usage: aws-account [OPTIONS]
A tool to print out AWS account and identity information to verify which
account/organization is currently in use.
Options:
--version Print version number.
--debug Enable debug output.
--help Show this message and exit
This is a early beta|draft version; use with caution and (if in doubt)
verify with aws' offical cli call aws sts get-caller-identity
.