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 Respuesta
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
EXPERTO
respondido hace 5 meses

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas