Create an EC2 t2.medium Ubuntu instance with 50GB storage.
Use one of:
- EC2 Instance Connect (browser terminal)
You only need this once to start the tunnel.
Run:
cd ~
wget https://update.code.visualstudio.com/latest/cli-linux-x64/stable -O vscode-cli.tar.gz
tar -xzf vscode-cli.tar.gzThis extracts a binary named code.
Run:
chmod +x code
./code tunnelYou will see:
- A login URL
- A device code
-
Open the URL in your laptop browser
-
Sign in with:
- GitHub, or
- Microsoft account
-
Approve the device
After approval, the terminal will show that the tunnel is running.
Leave this process running.
You would get a link like this open it and enjoy!
https://vscode.dev/tunnel/xxxx/home/ubuntu
Permission errors saving files → Fix ownership:
sudo chown -R ubuntu:ubuntu <project-folder>If the tunnel stops repeat the same steps.