aws / aws/aws-toolkit-vscode

auth/ux: unclear error message with use_dualstack_endpoint=true: "Inaccessible host ... at port undefined"

Open
#5,796 0 comments 0 reactions 0 assignees View on GitHub
auth-credentials bug ux
Dominant language
TypeScript
Stars
2k
Forks
807
Avg merge
10h 12m
Merged PRs (30d)
7

Description

## Problem

I couldn't connect to AWS and the **error message wasn't helpful**

## Steps to reproduce the issue

1. Add this to your `~/.aws/config` (also breaks with a top-level `use_dualstack_endpoint`):

```
[default]
s3 =
use_dualstack_endpoint = true
```

2. Make sure you don't have IPv6
3. In *Explorer* click on *Select a connection…* and click on a profile.

Error message:

```
2024-10-16 xx:xx:xx.xxx [info] auth: Updating connection state of profile:xxxxx to authenticating
2024-10-16 xx:xx:xx.xxx [info] auth: Handling validation error of connection: profile:xxxxx
2024-10-16 xx:xx:xx.xxx [info] auth: Updating connection state of profile:xxxxx to invalid
2024-10-16 xx:xx:xx.xxx [error] _aws.toolkit.auth.reauthenticate: Error: Unable to authenticate connection
-> UnknownEndpoint: Inaccessible host: `sts.eu-west-1.api.aws' at port `undefined'. This service may not be available in the `eu-west-1' region. ()
```

## Expected behavior

I had that config for years (from back when I had IPv6 locally) and it never caused a problem when using the AWS CLI or Python code with boto3.

While I'm ok with the connection not working, **I'd appreciate a better error message**.

(Most issues I found online where about proxies. So maybe, even if the error message won't be improved in the foreseeable future, maybe someone else with the same problem stumbles across this bug report.)

## System details (run `AWS: About` and/or `Amazon Q: About`)

- OS: Linux x64 6.10.6-amd64
- Visual Studio Code version: 1.93.0
- AWS Toolkit version: 3.28.0
- Amazon Q version: -/-

Contributor guide

Open the contributing guide

Research direction

Reproduce the failure in Explorer with use_dualstack_endpoint = true, no IPv6, and the reported AWS profile configuration. Start by tracing the auth validation error that produces “Inaccessible host ... at port undefined”; done means the connection failure reports a clear, useful cause instead of the current message.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, typescript, vscode
Domain
authentication, networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.