Amazon EC2 Integration

How to Deploy an Amazon EC2 Server Instance

Sign in as root user to Amazon EC2 after creating an account.

Navigate to Build a solution and select Launch a virtual machine.

For Step 1: Choose an Amazon Machine Image (AMI), search for Ubuntu.

Navigate to Ubuntu Server 20.04 LTS (HVM), SSD Volume Type.

Select the Select button.

For Step 2: Choose an Instance Type, select a pricing plan.

Select the Review and Launch button.

Select the Previous button.

Select the Add Rule button.

For Type, select All traffic.

For Source, select Anywhere.

Select the Review and Launch button.

Select the Launch button.

Select Create a new key pair.

Type keypair as the Key pair name.

Select the Download Key Pair button.

The keypair.pem file will be downloaded to your computer to use for SSH access.

Finish creating the instance by selecting the Launch Instances button.

Select the Instance ID link with the format i_xxxxxxxxxxxxxxxxx.

Select the Instance ID link again.

When the instance is created, copy the Public IPv4 address and Private IPv4 address to use during the installation processes.

Select the Connect button for the instance.

Select the SSH client tab.

Locate the file path where the keypair.pem file was downloaded.

For example, a common default file path would be ~/Downloads.

Use this command to change the keypair.pem file permissions with the system terminal application.

sudo chmod 0400 ~/Downloads/keypair.pem

Press Enter.

Type this SSH command, but with the same file path and URL shown in Step 4.

ssh -i "~/Download/keypair.pem" ubuntu@ec2-10-20-30-40.us-east-2.compute.amazonaws.com

Press Enter.

The command line will ask the following question.

Are you sure you want to continue connecting?

Type yes and press Enter to connect to the server.