The answer here is 'no'. As part of the AuthN process when you're working with AWS SSO programmatically, a browser must be used so that you can authorise the CLI client.
What you can do here is the following:
- Use a preferred browser.
- Skip a webpage by going to the 'verificationUriComplete' instead of 'verificationUri' (These are output fields from the 'StartDeviceAuthorization' call of the 'SSO-OIDC' API suite). The former being the verification URI, with the OTP 'userCode' included.
What you can do is create a script of your own which automates everything up until the point where you simply have to click on 'Authorize' on the web browser page that opens before you, due to the script. That's what I ended up doing through PowerShell and the AWS Tools for PowerShell.
You can use AWS CLI with AWS SSO. Please refer to AWS Doc below
If you want to see a demo, you can refer to below link.
Use AWS CLI to connect to AWS SSO that can only be accessed through Incognito Browserasked 2 months ago
SSO of CLI errorasked a month ago
boto3 "logging" into the AWS SSOAccepted Answerasked 8 months ago
AWS SSO Access for Linux?asked 8 months ago
Password/SSH based authentiaction for AWS CLI // authentication for AWS CLI without needing access keysAccepted Answer
ELI5: AWS CLI and SSOasked 10 months ago
Using Terraform with AWS SSO accountsasked 2 months ago
How to login into the AWS SSO using AWS CLI without needing browser?Accepted Answer
Restrictions on login using IP address when using AWS SSO cloud application.Accepted Answerasked 4 months ago
How do I sign into re:Post using AWS SSO?Accepted Answerasked 10 months ago