How to launch EC2 instance in AWS

In this blog, we are going to learn how to create EC2 instances in AWS

First, go to the AWS management console. Select EC2 under All Services

FIgure-1

Then select Instances shown in the EC2 dashboard.

Figure-2

At the top of the page, the Launch Instance icon is displayed. Select it.

Figure 3:  Selecting the launch instance

The first step in creating an EC2 instance is choosing an Amazon Machine Image (AMI). We are going to select Ubuntu Server 18.04 LTS (HVM) SSD VolumeType having 64-bit (x86) version.

Figure 4: Choosing an AMI

Then go to the Choose Instance TypeTab. Select an instance as you prefer. We selected the General Purpose 12 micro instance as shown in figure 5.

Figure-5

Step 3 is configuring instance details. Select the default network. Note that you can create a new VPC if you want. Select a Subnet and put the Auto-assign public IP as enabling. If you have any IAM roles make sure to select them. Then you can specify any information inside the user data field.

Figure-6

Then let’s move into the Add Storage tab. You can specify the size of the storage as you wish. In here we gave the size as 8GiB.

Figure 7: Adding the storage

Then you can add tags in the Add Tag tab. You have to give key-value pairs in here, and note that these are case sensitive. Give a suitable name for the Key and the Value. For demonstration purposes, we just gave Kay as Name and Value as dw-test.

Figure 8: Adding tags

The 6th step of creating an EC2 instance is configuring the security groups. A security group is a set of firewall rules that controls the traffic. You can select an existing one or you can create a new one. Let’s create a new security group names dw_test as shown in figure 9.

Figure-9

Then go to the Review tab. You can review everything related to the instance that you are going to create. Then launch the instance by selecting the Launch icon.

After selecting it will ask for a Keypair.  A Keypair has two keys, which are a public key and a private key. AWS stores the public key and the private key is for us. This helps to connect with the instances securely. You can choose an existing key pair or create a new one.

Let’s create a new key pair and give a name. Then download the key pair.

Figure 10: Creating a new Key pair

Then launch the instance. It will take few minutes to load.

Figure 11: Launching the instance

Then select the newly initiated instance.

Figure 12: Selecting the instance

Look at the status of the instance. Now we can see its running. You can check for the other parameters also, like the availability zone, IPv4 public IP, etc.

Figure 13: Newly created instance is running

Video Tutorial

Leave a Reply

Your email address will not be published. Required fields are marked *