Q: login fails if endpoint_url is set in [default] profile of ~/.aws/config #6299
Labels
auth-credentials
authentication, authorization, credentials, AWS Builder ID, sso
bug
We can reproduce the issue and confirmed it is a bug.
Problem
Hi! Seemed to have figured out the issue and brining it to your attention!
The Error is in Amazon Q extension for vscode. Logging in with the free tier seems to use the default endpoint_url from the .aws config file if one is set, which results in an error opening the web view client, this seemed to be the most relevant general one:
[error] webviewId="aws.amazonq.AmazonCommonAuth": Error: Webview error -> Error: Webview backend command failed: "startCodeWhispererBuilderIdSetup()" -> Error: Failed to connect to AWS Builder ID [FailedToConnect] -> SyntaxError: Unexpected token '<', "<!DOCTYPE "... is not valid JSON
Installed AWS Q in vscode and attempted to try it out via the free tier. Received errrors immediately, as the webview client did not open. After a while of perusing the error messages, I finally realized one of the links in the message looked familiar- It was a reaching out to an api via my default endpoint_url from the .aws config file, though constructing it with the normal paths. Upon removing the config setting and reinstalling the extension, (a likely more secure setting in hindsight, but still inconvenient) the error disappeared.
Steps to reproduce the issue
Expected behavior
Opens the webview client to create builder ID
System details (run
AWS: About
and/orAmazon Q: About
)The text was updated successfully, but these errors were encountered: