How to create ec2 instance

How to Create EC2 Instance in AWS | Step by Step Tutorial 2020

How to Create EC2 Instance in AWS

What is Amazon EC2 Instance?

An EC-2 instance technology is nothing but a virtual server in AWS (Amazon Web services).

It stands for Elastic Compute Cloud. It is an internet service where an AWS subscriber can request and provision a compute server in the AWS cloud.

An on-demand EC2 instance is an offering from AWS where the user can rent the virtual server as per requirement and use it to deploy their own applications.

The instance is charged per hour with different rates supported by the sort of instance chosen. AWS provides multiple instance types as per the needs of the user.

Login and access to AWS services:
Login to your AWS account and attend the AWS Services tab at the highest left corner.
Here, you’ll see all of the AWS Services categorized as per their area viz. Compute, Storage, Database, etc. For creating an EC2 instance, we’ve to settle on Compute EC2 as within the next step.

How to Create EC2 Instance in AWS 01

Creating an Amazon EC2 instance
Services -> Compute services -> EC2  this may launch the dashboard of EC2.


Here is that the EC2 dashboard. Here you’ll get all the knowledge in gist about the AWS EC2 resources running.

On the highest right corner of the EC2 dashboard, choose the AWS Region during which you would like to provision the EC2 server.

Here we are selecting N. Virginia. AWS provides 10 Regions everywhere in the world.

Once your required Region is chosen, come to the EC2 Dashboard.

Click on the ‘Launch Instance’ button within the section of Create Instance (as shown below).


Click on ‘Launch Instance‘.

Creating an Amazon EC2 instance

Creating an Amazon EC2 instance Step 1 | Choose an Amazon Machine Image

You will be asked to settle on an AMI of your choice. (An AMI is an Amazon Machine Image. it’s a template basically of an OS platform which you’ll use as a base to make your instance).

If you start the EC2 instance from AMI, the instance will automatically be booted with the specified OS.
We are going with the default Amazon Linux (64 bit) AMI.
Creating an Amazon EC2 instance


Creating an Amazon EC2 instance Step 2 | Choose EC2 Instance Types:

within the next step, you’ve got to settle on the sort of instance you need to support your business needs.

We will choose the t2.micro instance type, which may be a 1vCPU and 1GB memory server offered by AWS.

Click on “Configure Instance Details” for further configurations
Creating an Amazon EC2 instance


Creating an Amazon EC2 instance Step 3 | Configure Instance

In the next step enter details like no. of instances you would like to launch at a time.

No. of instances- you’ll provision up to twenty instances at a time. Here we are launching one instance.

As a beginner, you can skip other fields on this step.

Click on ‘Add Storage’ to feature data volumes to your instance in next step.


Creating an Amazon EC-2 instance Step 4 | Add Storage

In the Add Storage step, you will see that the instance has been automatically provisioned a General Purpose SSD root volume of 8GB. ( Maximum volume size we will give to a General Purpose volume is 16GB).

You can change your volume size, add new volumes, change the quantity type, etc.

AWS provides 3 sorts of EBS volumes- Magnetic, General Purpose SSD, Provisioned IOPS. you’ll choose a volume type that supported your application’s IOPs needs.


Creating an Amazon EC-2 instance Step 5 | Add Tags

you can add a tag to your instance with a key-value pair. this provides visibility to the AWS account administrator when there’s tons number of instances.

The instances should be tagged to support their department, environment like Dev/SIT/Prod. Etc. this provides a transparent view of the costing on the instances under one common tag.

Here we’ve tagged the instance as a demo.Then click on  configure Security.


Creating an Amazon EC-2 instance Step 6 | Configure Security Groups

during this next step of configuring Security Groups, you’ll restrict traffic on your instance ports. this is often another firewall mechanism provided by AWS aside from your instance’s OS firewall.

You can define open ports and IPs.
Since our server may be a web server, we’ll do the subsequent things.

Creating a replacement Security Group
Naming our SG for easier reference Defining protocols which we would like to be enabled on my instance


Creating an Amazon EC-2 instance Step 7 | Review And Launch

we will review all our choices and parameters and therefore the go-ahead to launch our instance


Creating a key pair for Amazon EC-2 instance

A key pair may be a set of public-private keys.

AWS stores the private key within the instance, and you’re asked to download the private key. confirm you download the key and keep it safe and secured. if it’s lost you can’t download it again.

  • Create a replacement key pair
  • Give a name to your key
  • Download and reserve it in your secured folder

Now You can see the status of your EC-2 instance in running.


Click on the Connect Button and then you can ssh on your EC-2.

But we are using the MobaXtream software for SSH. So, copy the Public IP address.


To SSH EC-2 Machin using MobaXtream.

Install MobaXtream into your system. open MobaXtream software.

Click on “Session”


One popup window comes.

Click On SSH => Then add IP which we copy. (IP of EC-2).

Then add user name. for the Amazon AMI default username is ec2-user.

Then click on Advanced SSH settings.


Now, Select the key which we download earlier.

Then click on Ok.


Congratulations You are in EC2 Machine.


Boost Your Programing Skils With Our Tips

About the Author: Rahul Wagh

You May Also Like

Leave a Reply

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