[v2] aws sso commands should allow opting out of automatically opening a browser
Problem
Is your feature request related to a problem? Please describe. I'm using a remote shell via SSH to a machine that has a GUI (macOS). When performing `aws configure sso` or `aws sso login` it dumps out the url and code to enter into a browser myself. However, the browser has already opened on the remote machine even though I cannot easily access it (nor want to). AWS does not allow me to use the url and code from the console in this scenario to login from my host machine because it was already used by the remote, unseen, browser. Describe the solution you'd like A CLI flag like `--no-browser` to avoid launching the default browser on the system, allowing me to use the url and code myself manually. Describe alternatives you've considered A CLI interactive prompt asking whether you'd like to open the default browser. I like this too, and think it should exist before automatically opening another window on my system, but I feel like CLI flags should always exist as well.
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Solution: [v2] aws sso commands should allow opting out of automatically opening a browser
@mmerickel This is definitely a reasonable feature request to have something explicit to say "don't open a browser". We went back and forth on whether or not we should open a browser at all, should it be the default, etc. when implementing this initially and opted to try and be smart and always try to open the browser with some fallback text. Because we use `webbrowser` stdlib module: https://doc
Trust Score
6 verifications
- 1
@mmerickel This is definitely a reasonable feature request to have something exp
@mmerickel This is definitely a reasonable feature request to have something explicit to say "don't open a browser". We went back and forth on whether or not we should open a browser at all, should it be the default, etc. when implementing this initially and opted to try and be smart and always try to open the browser with some fallback text.
- 2
Because we use `webbrowser` stdlib module: https://docs.python.org/2/library/web
It should be possible to set the `BROWSER` env var to something else that acts like a no-op as a workaround. For example, you could try using `true`:
- 3
Let me know if that works for you in the interim.
Let me know if that works for you in the interim.
Validation
Resolved in aws/aws-cli GitHub issue #5301. Community reactions: 20 upvotes.
Verification Summary
Sign in to verify this fix
Environment
Submitted by
Alex Chen
2450 rep