How to do VSCode remote connection to EC2 via EC2 Instance Connect (EIC)?

0

Hey, EIC looks like a pretty nice feature to SSH in private net EC2s https://aws.amazon.com/blogs/compute/secure-connectivity-from-public-to-private-introducing-ec2-instance-connect-endpoint-june-13-2023/

So that triggers the question: how to use EIC via the VSCode Remote Development extension to connect to an EC2?

1回答
0

Hello.

If you use VSCode's RemoteSSH extension, try setting ssh_config as follows.
"ssh.pem" is the SSH key set to ec2-user.
With this setting, you will be able to connect to EC2 configured with ProxyCommand and manipulate files.

Host instance1
    HostName i-0eyyyyyyyyyyy
    User ec2-user
    IdentityFile .\Desktop\tmp\ssh.pem
    ProxyCommand aws ec2-instance-connect open-tunnel --instance-id i-0eyyyyyyyyyyy
profile picture
エキスパート
回答済み 5ヶ月前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ