- Download a user script plugin for your browser. I recommend tampermonkey and enable it.
- In the tampermonkey plugin menu select
Create a New Script
- Paste in the
aws-fix-role.js
script
-
Update
line 17
with your first account ID and alias, then add any additional accounts as needed. -
Save the code
ctrl + s
And you are done.
This script will not execute if the site doesn't start with https://console.aws.amazon.com
I've disabled updates because tampermonkey can be dangerous with autoupdates on.