aws / aws/aws-toolkit-vscode

Connect VS Code to EC2 Instance not working with Debian 12

Open
#7,448 1 comment 0 reactions 0 assignees View on GitHub
bug remote-execute service:ec2
Dominant language
TypeScript
Stars
2k
Forks
807
Avg merge
10h 12m
Merged PRs (30d)
7

Description

## Problem

I have an EC2 instance with SSM configured on a Debain 12 OS. When trying to connect VS Code to EC2 Instance I'm facing this error.

```
2025-06-09 14:50:09.021 [info] Log level: info, beta=false
2025-06-09 14:50:09.021 [info] endpoints: retrieving AWS endpoints data
2025-06-09 14:50:09.021 [info] Telemetry product: AWS Toolkit For VS Code
2025-06-09 14:50:09.139 [info] Telemetry clientId: f4223dc0-1b9f-4fad-a3c3-378c7ea94def
2025-06-09 14:50:09.139 [info] Telemetry sessionId: c62d64ff-9006-4b9e-ab0b-e72306cd4fd2
2025-06-09 14:50:09.196 [info] OS: Linux x64 6.8.0-60-generic
2025-06-09 14:50:09.196 [info] Visual Studio Code extension host: 1.100.3
2025-06-09 14:50:09.196 [info] AWS Toolkit: 3.64.0
2025-06-09 14:50:09.196 [info] node: 20.19.0
2025-06-09 14:50:09.196 [info] electron: 34.5.1
2025-06-09 14:50:09.203 [info] initialized 'submitFeedback' command with default feedback id: AWS Toolkit
2025-06-09 14:50:11.360 [warning] AwsContext: no default region in credentials profile, falling back to us-east-1:
2025-06-09 14:50:11.566 [info] auth: Updating connection state of profile:default to authenticating
2025-06-09 14:50:12.642 [info] auth: Updating connection state of profile:default to valid
2025-06-09 14:50:13.149 [warning] Ec2MetadataClient failed to fetch token. If this is an EC2 environment, then Toolkit will fall back to IMDSv1: TimeoutError: Socket timed out without establishing a connection ()
2025-06-09 14:50:34.557 [error] aws.ec2.openRemoteConnection: Error: Unrecognized OS name Debian GNU/Linux on instance i-0bbc3b85ffa13ef2d [UnknownEc2OS]
2025-06-09 14:54:48.847 [error] aws.ec2.openRemoteConnection: Error: Unrecognized OS name Debian GNU/Linux on instance i-0bbc3b85ffa13ef2d [UnknownEc2OS]
```

## Steps to reproduce the issue

1. Create an EC2 instance with debain 12 and configure SSM.
2. Try to connect VS code to EC2 instance using AWS toolkit

## Expected behavior

To be able to connect VS Code to EC2 instance

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

- OS: Host=Ubuntu 22.04.5 LTS, EC2 instance=Debain 12
- Visual Studio Code version: 1.100.3
- AWS Toolkit version: 3.64.0
- Amazon Q version: 1.71.0

Contributor guide

Open the contributing guide

Research direction

Reproduce the AWS Toolkit VS Code connection flow with an SSM-configured Debian 12 EC2 instance, starting from the aws.ec2.openRemoteConnection error showing UnknownEc2OS. Check how the toolkit identifies the instance operating system and verify the connection succeeds for Debian 12 without regressing the existing cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, typescript, vscode
Domain
cloud, devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 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.