ECS: forward remote port via SSM
- Dominant language
- TypeScript
- Stars
- 2k
- Forks
- 807
- Avg merge
- 10h 12m
- Merged PRs (30d)
- 7
Description
## Problem
I need to forward a remote port in the ecs-task to the local machine.
I am able to do this through session manager using the parameters eg:
```
aws ssm start-session
--target" $target
--document-name "AWS-StartPortForwardingSession"
--parameters '{"portNumber":["$port"],"localPortNumber":["$localPort"]}'
```
## Expected behavior
Right bellow the ECS tree, when the right mouse is clicked in the container, open a new menu with an option to forward a port in the remote ecs-task to the local host.
**Nice option:**

Also would be great if this option is available in an vs-code launch-type, as this feature is usefull to debug remote ports.
**Great launch configuration:**
```json
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "aws-ssm",
"name": "Open ECS task port forwarding",
"command": "start-session",
"target": "${input:aws-ecs-target}", // should open target picker (idk how -- maybe using input https://code.visualstudio.com/docs/editor/variables-reference#_input-variables)
"document-name": "AWS-StartPortForwardingSession",
"parameters": {
"portNumber":["${input:aws-ecs-port}"],
"localPortNumber":["${input:aws-ecs-localPort}"]
}
}
]
}
```
thanks guys. Sorry for my bad english :smile_cat:
Contributor guide
Research direction
Start by reviewing the ECS tree context menu and the existing SSM start-session handling; the issue names no files or tests. Compare the requested AWS-StartPortForwardingSession parameters and the proposed VS Code launch configuration. Done means a user can select an ECS container, forward its remote port locally, and use the workflow from a launch configuration.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, typescript, vscode
- Domain
- cloud, devtools
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100