aws / aws/aws-toolkit-vscode

EC2 Remote from Windows : ec2_connect.ps1 missing

Open
#6,248 28 comments 6 reactions 0 assignees View on GitHub
bug platform:windows service:ec2
Dominant language
TypeScript
Stars
2k
Forks
807
Avg merge
10h 12m
Merged PRs (30d)
7

Description

## Problem

When trying the new experimental feature to "connect to EC2 instance in a new Remote window" from Windows, the script `ec2_connect.ps1` is missing.

![image](https://github.com/user-attachments/assets/fd2391c9-05de-4338-8dca-f2d4a0444f37)

Logs :

```
2024-12-16 13:36:48.386 [error] aws.ec2.openRemoteConnection: Error: Failed to update connect script [ConnectScriptUpdateFailed]
-> EntryNotFound (FileSystemError): Error: ENOENT: no such file or directory, open 'c:\Users\[redacted]\.vscode\extensions\amazonwebservices.aws-toolkit-vscode-3.39.0\resources\ec2_connect.ps1' [FileNotFound]
```

## Steps to reproduce the issue

1. Start VSCode on Windows, with AWS Toolkit 3.39
1. Enable experimental feature "ec2RemoteConnect"
2. Browse to an EC2 in AWS Toolkit explorer
3. Click the button "connect to EC2 instance in a new Remote window"
4. The error is shown

## Expected behavior

I should be able to open a new VSCode window, connected to this remote EC2 through SSM.

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

- OS: Windows 11
- Visual Studio Code version: 1.96.0
- AWS Toolkit version: 3.39.0
- Amazon Q version: NA

Contributor guide

Open the contributing guide

Research direction

Start with the EC2 remote connection flow and the resources/ec2_connect.ps1 path shown in the log, then reproduce the steps on Windows with the ec2RemoteConnect feature enabled. Trace how the connect script is packaged or located; done means a new VS Code window connects to the EC2 instance through SSM without the missing-file error.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, powershell, typescript, vscode
Domain
cloud, devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.