Create your first AWS EC2 instance

Virtual Servers in the Cloud

Create your first AWS EC2 instance

Let's create our first AWS account first

For creating aws free tier account, do follow this link from aws itself.
create-and-activate-aws-account.

As these steps are well explained, easy to understand and follow, we move to EC2 instance part.

What is EC2 instace?

Amazon EC2 instance (Elastic Compute Cloud) is a web service that provides resizable compute capacity in the cloud. With Amazon EC2 you launch virtual server instances on the AWS cloud. Each virtual server is known as an “instance”.

Amazon EC2 supports a variety of operating systems including:

Amazon Linux Ubuntu. Windows Server. MacOS. Red Hat Enterprise Linux. SUSE Linux Enterprise Server. Fedora. Debian. CentOS. Gentoo Linux. Oracle Linux. FreeBSD.

Now, Have some hands on. While creating EC2 instance, there are 3 basic major parts of it.

  1. Choosing Operating System
  2. Choosing Instance type & creating Key Pair
  3. Creating security group

Step 1: login to your aws console. Click on Services > Compute > EC2

Screenshot from 2022-11-03 23-06-17.png

Step 2: Click on Launch Instance. Give name to your server and choose Operating System for this demo, we gonna choose Ubuntu OS.

Screenshot from 2022-11-03 23-29-46.png

Amazon EC2 High Memory instances can have memory of EC2 instance from 0.6 GB up to 24 TiB.

Step 3: We will choose t2.micro instance type as it is free to use upto 750 hours in a month and provides 1 vCPU and 1 GiB memory. Also, create key pair. Give name to key pair. Make sure name is unique, .pem and download.

Screenshot from 2022-11-03 23-31-00.png

Step 4: In this step, we will create security group. Security Group manages inbound and outbound network traffic. Always check ssh (port 22) and any other port open as needed. SSH helps in connecting our EC2 instance with terminal. Follow as shown in picture.

Screenshot from 2022-11-03 23-32-10.png

Step 5: In this instance, 8 GB EBS (Elastic Block Store) is attached by default. Hit Launch Instance.

Screenshot from 2022-11-03 23-36-31.png

Step 6: Once your instance is created and running, you will see something like this after clicking on instance id showing in blue color in success box.

Note public IP address from here as we will use this to connect server in terminal.

Screenshot from 2022-11-03 23-43-53.png

Now, connect from our terminal. use below command :

chmod 400 <.pem key location> ssh ubuntu@ -i <.pem key location>

Boom, your server is connected and ready. Perfrom your operation and have fun.

You can refer this page for more details about EC2.

Happy Computing, KV. ❤️