/aws-account

A cli tool to print out AWS account and identity information to verify which account/organisation is currently in use.

Primary LanguagePythonApache License 2.0Apache-2.0

aws-account

CodeQL Action Python Lint Action

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.

Install

Recommended to install via pipx

pipx install aws-account

Usage

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

Example output: Screenshot output

Note

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.