AWS SSO Login Picking the Wrong Browser

AWS Cloud

When you are trying to login to AWS using the CLI tool, you may find that the window opens a tab in the wrong browser, to get around this you can apply a “–no-browser” at the end of the sso login command, for example:

aws sso login --profile <profile name> --no-browser

Now instead of opening a browser automatically, you’ll get the code and a pre-formatted URL which contains a code, that you can then use in the browser tab of your choice.

I personally use this when I need to swap from a normal management profile to a more powerful management profile that requires me to login to AWS with a completely different user account, to ensure the correct browser window can be used!

Leave a Reply

Your email address will not be published. Required fields are marked *