Userscript for the AWS Console to identify the current AWS account more easily. Supports individual accounts as well as AWS access portal.
The script shows the name of the current account in the "search" input field in the menu bar. It also changes the color of the menu bar based on rules in the script. The default rules color the menu bar green or red when the account name contains "dev" or "prod", respectively.
- Install the browser plugin Tampermonkey
- Open the script
- Click "Install"
The rules in the ACCOUNT_NAME_COLOR_RULES
array map AWS account names to menu bar colors.
The first matching regular expression wins.
The ACCOUNT_OVERRIDES
object contains AWS account IDs with specific names and menu bar colors.
Use these overrides for exceptions to the rules in ACCOUNT_NAME_COLOR_RULES
.
The script extracts the current account name from the JWT token in the cookie aws-userInfo-signed
.
The menu bar colors are based on regular expressions that match the extracted account name,
with the possibility to add exceptions based on AWS account ID.