How To Launch Basic Ubuntu EC2 Instance On AWS?

Note: We will be using Free Tier setup & I hope you’ve completed

Services which we will be using for Basic Ubuntu EC2 Instance Setup:

  1. EC2
  2. Security Group
  3. Key Pair
  4. AMI
  5. VPC
  6. Subnet
  7. Storage

For creating Ubuntu server, first we need to create and deploy an EC2 Instance,

For this, first Go to Services and under Compute section, Click On EC2:

You’ll get something like this:

Now Click On the Launch instance button from right top corner to proceed for the Instance creation setup.

after that, there will be total 7 Steps to complete the Ubuntu EC2 Deployment, we will cover every step one by one.

for the Step 1, you’ll be asked to choose Images from list to deploy on the EC2 Instance,

For this case, we’ll be using Ubuntu 20.04 Image:

You can choose any other AMI as per your requirements,

Finalize the AMI which one you wanna deploy, and click on Select

In the Step 2, You’ll be asked to choose the Instance Type, We will be using Free Tier Instance which is t2.micro in this case, so select that one and click on Next: Configure Instance Details

Now, This Is Step 3, here we need to configure Instance details such as VPC & Subnets,

there are lots of settings we can customize in this page, but for now on we’ll be using only VPC & Subnets.

We’ll be using our own created VPC & Public Subnet as the following:

Then Click On Next: Add Storage from right bottom corner to proceed to Storage setup for the Instance.

This will be Step 4, you can use the default value which will be 8 GB of GP2 storage which will be Free Tier Eligible,

remember to select check box for Delete on Termination which means the storage drive will be terminated on the termination of EC2 Instance.

Then click on Next: Add Tags to proceed further.

On this Step 5, you can add as many tags as possible, it will be used to Identify the Instances & linked resources,

After choosing this, Select on Next: Configure Security Group, from the bottom right corner,

This is Step 6, here we can configure the which Ports will be open for the instance,

We can define name & description for the Security group to identify it better, we can also choose which Port is open and who can access that port by defining Specific IP Address, we can also write description as shown in the upper image. It is considered to be a Must/Good Security Practice.

After doing all these, click on Review and Launch from bottom right corner to go to the Final Step.

In this Step 7, we can check all the configurations we have done so far before Launching the instance,

After verifying all the configuration, Click on Launch

When you click on Launch, a small dialog box will open and will ask you to Choose an Key Pair or Create one, which will be used to Access the Instance using SSH.

For this case, we need to Create one by clicking on Create a new pair key and give the key a name something like ubuntu-test as you can see in the following Image:

After that, Click on Download Key Pair, which will download a file named ubuntu-test.pem file, after that click on Launch Instance and the Instance will be launched and you will see a page something like below:

Now, Click on View Instances, it will take you to the Instance Console where you can see all the Instances.

as you can see, There is 1 Instance running which is Ubuntu, our created one. now click on the Ubuntu Instance check box and a new panel will be open at the bottom which will show the Instance details such as below,

Here, you can see many details such as Instance ID, Public IPv4 address, VPC ID, Subnet ID and many more.

Now for accessing the Instance via console, we can use

Open the MobaXterm and Click on, Session from top menu bar, after that click on SSH and fill the Remote host, Specify username (‘ubuntu’ for Ubuntu AMI) & click on Use private key and choose the ubuntu-test.pem file which we downloaded form the Step 7. (follow the below picture)

After Successful Configuration You’ll see a screen like below,

That’s It, Now you can do anything with this Instance Like Installing Nginx or Apach2 web server to Host any Website.

Thank You. #SharingIsCaring

#dcgmechanics ☠️



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store