Development on AWS EC2 through Termius and VSCode
Create AWS EC2 Instance
> Go to the console of AWS.
https://console.aws.amazon.com/console/
> Select the Launch a virtual machine.
> Select a machine that you want to use.
I just select this machine. 😁
> Select instance type and click the Review and Launch button
> Click Launch button
> Create a new key pair for SSH.
Input the name of the key pair and download it.
You have to keep this file important.
And click the Launch Instances button.
Now, you can see your instance.
Access AWS EC2 through Termius
> Install Termius
$ brew install --cask termius
> Open Termius
Sign up or Log in to Termius.
> Create NEW HOST
Click + NEW HOST button
Input the address from the AWS EC2.
And next, Click Keys button.
Click + KEY button.
Input the Label and downloaded the key pair file.
Now, input username as ec2-user.
Enjoy your instance!
Access AWS EC2 through VSCode
> Install Remote - SSH extension.
> Connect to host
> Add new SSH host
> Enter SSH connection command
Input the name of this connection.
> Select SSH configuration file to update
I selected the configuration file in the specified user's home directory.
> Configure the SSH connection
Open the config file and edit it.
Input AWS EC2 instance address into the HostName field, ec2-user into User field, and path of downloaded key pair file into IdentityFile field.
> Access to AWS EC2
Enjoy it~!!