Create Ubuntu EC2 Instance on AWS

— Login to the AWS console

— Under “AWS Management Console” –> “AWS Services” –> “Find Services” enter EC2 then click on search result “EC2: Virtual Servers in the Cloud”.

— Click on “Instances” section then select “Instances”

— Click on “Launch Instance”

— Under search box type “Ubuntu” and then press enter. Choose your preferred Ubuntu OS version from the search result. Here I will choose the first result ie the latest Ubuntu OS version 18.04.

— Choose your preferred “Instance Type”. You can refer “AWS Simple Monthly Calculator” before choosing your Instance type to get an idea about the monthly billing/price of your EC2 instance.

Here I am going to choose “t3a.micro” instance type which have 2 vCPUs/1 GB Memory/EBS Storage.

Then click on “Next: Configure Instance Details”.

— Under “Step 3: Configure Instance Details”, Enable termination protection option.

Then click on “Next: Add Storage”.

— Under “Step 4: Add Storage”, Define your preferred root volume size. By default, it is present at 8 GB. Here I am going to change my root partition size to 10 GB.

Then click on “Next: Add Tags”.

“Step 5: Add Tags” is optional but it is recommended to use the tags to define your instance type/group etc. Here I am defining tag’s Key=Name and Value=FlyWithEdu-Monitor.

Then click on “Next: Configure Security Group”.

— Under “Step 6: Configure Security Group”, Change the preferred security group name like here I defined “Security group name: FlyWithEdu-Monitor-SG”. Also, make sure your EC2 SSH connectivity is not open to the world, so better choose the “Source: My IP” for the SSH.

Then click on “Next: Review and Launch”.

— Under “Step 7: Review Instance Launch”, review your all defined values and then click on the “Launch” button.

— Once you will click over the “Launch” button, you will get below popup to either create or use an earlier/existing key pair. Here I will choose my existing key pair to launch the instance.

Note : Please download and keep your key secure to access your EC2 instance.

After above selection, click on “Launch Instances”.

— Go to EC2 Dashboard –> Instances. Once the instance will be up, you will see instance state is “running” and Status Checks “2/2 checks passed”.

— To get the connectivity details/instruction of your EC2 instance, just select the EC2 instance and then click over the “connect” button.

— I connected EC2 instance using the above details. See, below are the details of installed Ubuntu EC2 instance.

ssh -i .ssh/FlyWithEdu.pem ubuntu@ec2-XX-XXX-XXX-XX.us-west-2.compute.amazonaws.com
Last login: Sun Jun 21 07:03:35 2020 from XX.XX.XX.XXX

ubuntu@ip-XXX-XX-XX-XXX:~$ sudo su -

root@ip-XXX-XX-XX-XXX:~# cat /etc/os-release
NAME="Ubuntu"
VERSION="18.04.4 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04.4 LTS"
VERSION_ID="18.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic
root@ip-XXX-XX-XX-XXX:~#

— Please checkout my below related blogs.

Leave a Reply