How to Create EC2 Instance and Access It Remotely? (Step by Step)

ยท

2 min read

How to Create EC2 Instance and Access It Remotely? (Step by Step)

Table of contents

No heading

No headings in the article.

This article is to help you, How you can set up your EC2 instance under 5 minutes if you follow all the given steps correctly.
First, Log-In to your AWS account. In this tutorial, we are going to use free-tier services.


On the console page, search for "EC2" and click on it.

Untitled.png

Click on launch Instance.

Untitled.png

Enter Name for your EC2 instance => I have given "My EC2" Here, we are selecting Ubuntu OS. From Amazon Machine Image, Be sure to select "Free Tier Eligible" so that it will not cost you anything.

image.png

Next select instance type t2.micro "Free Tier Eligible".

image.png

Now we are creating key-pair which we will use to connect to AWS instance from our machine.

Click on "Create new key pair" Enter "Key pair name" => My key Name is "My EC2"

image.png

Click on "Create Key Pair" => which will download the key (file with extension .pem) on your machine. Keep it safe.

Next Don't change anything. Keep Network Settings as it is.

image.png

Keep Configure Storage as it is. Untitled.png

Click on "Launch Instance" which is on the right bottom side.

You will get following message.

Untitled.png

Click on View All Instances.

As you can see, our "My EC2" instance is up and running. (ignore the "FM" instance which I had set up before)

image.png


Select our instance and click on connect .

image.png

Select "SSH Client" and copy command to connect to our instance from our machine.

image.png

Now open terminal on your machine.

image.png

Go to the location on your terminal, where your downloaded key is located. ( We downloaded our "Key Pair" in previous steps. )

Untitled.png

Paste the command which we copied from AWS "SSH Client" page.

Untitled.png

And hit enter.

Untitled.png Congratulations ! You have now access to your AWS EC2 instance.

If you want to exit, enter "logout" command

image.png

After your usage, make sure to terminate the instance.

image.png

Thanks For Reading ๐Ÿ˜Š

ย