How to create an EC2 instance in AWS (Amazon Web Service) and connect to the instance

Christober S
3 min readNov 2, 2023

--

EC2 Instance

First login to the AWS management console

After login to the AWS management console, the page will look like this as shown in the picture

Search for EC2

In the above search option just search for the EC2

EC2 instance

After that the page will look like this, Here you want to configure

Write the name of the EC2 instance

Choose the image (Operating System) I’m choosing the default AWS Linux

Choosing the size of the operating system

Key pair

Then, we have to create a key pair which is used to log into the EC2 instance, choose the key pair type as RSA and Private key file format as .pem then click the option create key pair. It will automatically download the .pem file of this key pair

After configuring all the things just click launch instance

After launching the instance the page will look like this as shown in the picture

After that go back to the instance page and you can look your instance here.

Then, enter into the instance and here you can see the EC2 instance private IP and public IP . Click the option connect in right top to connect into the EC2 instance

After, clicking the connect we can connect to EC2 in a few ways as shown in the picture including EC2 instance connect, session manager, SSH client, and EC2 serial console. Here I’m connecting through EC2 Instance connect option

EC2 Instance connect page

A new tab will be opened like the above picture, now we are connected to the EC2 instance

Now I’m on my Linux machine here, I can do my Linux task or I can make use of this Linux server

Using linux commands

--

--

Christober S
Christober S

Written by Christober S

Student | Cloud | DevOps | Tech Blogger | Public Speaker

Responses (1)