AWS provides a way to switch accounts in the same browser using "Switch role": https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_switch-role-console.html
Once you switch to another role/account, it will stay on that browser's "history" - it uses cookies to store the list of roles you switched to.
If you want to update that list, currently the only way is to update the cookie.
NOTE: you'll need to URL-encode the updated value before updating it in the browser's cookie.
In chrome, similar for other browsers:
- Navigate to
Application > Cookies
- Search for the cookie
noflush_awsc-roleInfo
- In the cookie valye, select "Show URL-decoded"
- Copy the value to a text editor, make the changes
- URL-encode the updated JSON:
- use a tool like DevUtils (MacOS) or an online tool
- can also use JS: https://jsfiddle.net/510myzst/1/ (remember to remove the quotes at the start/end before using the output)
- Replace the existing value for
noflush_awsc-roleInfo
Inspired by: https://www.reddit.com/r/aws/comments/46fn6v/clear_role_histotry/