Skip to content

Commit 13890e1

Browse files
committed
update docs
1 parent a2daf60 commit 13890e1

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

docs/arch_features.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,19 @@ These modules show how to use and extend the "remote connect" functionality:
4747
- CodeCatalyst: [openDevEnv()](https://github.com/aws/aws-toolkit-vscode/blob/c77fc076fd0ed837d077bc0318716b711a2854c8/packages/core/src/codecatalyst/model.ts#L252)
4848
- EC2: [openSessionInTerminal()](https://github.com/aws/aws-toolkit-vscode/blob/c77fc076fd0ed837d077bc0318716b711a2854c8/packages/core/src/ec2/model.ts#L147)
4949
- ECS: [openTaskInTerminal()](https://github.com/aws/aws-toolkit-vscode/blob/c77fc076fd0ed837d077bc0318716b711a2854c8/packages/core/src/ecs/commands.ts#L133)
50+
51+
### EC2 Remote Connect Details
52+
53+
The toolkit provides two options for connecting with EC2 instances: remote terminals and remote windows. Both connections are done via SSM, but the remote window involves an SSH tunnel over SSM. To establish the tunnel, there a few steps the toolkit automates the following:
54+
55+
- Update the `.ssh/config` file locally to leverage a connect script [resources/ec2_connect](https://github.com/aws/aws-toolkit-vscode/blob/master/packages/core/resources/ec2_connect) via proxy command.
56+
- Generate a temporary set of SSH Keys, sending the public key to the remote instance.
57+
- Use the SSM connection to tunnel an SSH connection that we can then pass through VSCode to open a remote window.
58+
59+
Some additional technical details:
60+
61+
- The keys are generated via ed25519 if supported, otherwise RSA. The keys have a lifetime of 30 seconds.
62+
- If insufficient actions exist on the attached IAM role, a prompt will pop-up asking to add an inline-policy.
63+
- The toolkit maintains the invariant that each instance can be associated with a single active SSM session. All active sessions created through the toolkit are terminated on close.
64+
65+
For more information, refer to the implementation in [ec2](https://github.com/aws/aws-toolkit-vscode/tree/master/packages/core/src/awsService/ec2)

0 commit comments

Comments
 (0)