Skip to content

Q: login fails if endpoint_url is set in [default] profile of ~/.aws/config #6299

Open
@tyrsday29

Description

@tyrsday29

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/or Amazon Q: About)

  • OS: Windows
  • Visual Studio Code version: newest
  • AWS Toolkit version: newest
  • Amazon Q version :newest

Metadata

Metadata

Assignees

No one assigned

    Labels

    auth-credentialsauthentication, authorization, credentials, AWS Builder ID, ssobugWe can reproduce the issue and confirmed it is a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions