Elastic Compute Service (EC2)


Log in to your AWS account, click in the search bar at the top, and type EC2. This will open the EC2 console.
On the EC2 dashboard, the first thing to do is to create an SSH Key pair (For secure authentication and access to Linux-based EC2 instances).
Once you create the key pair, the browser will ask you to save the private component of this key pair.
Then we continue the process of creating an EC2 instance on the EC2 dashboard.
Click on launch instances, and it will take you to the launch instance part of the console:
AMI is used to deploy the operating system to an EC2 instance, then you can select from different versions of operating systems (Using the free tier eligible for now)
Can pick from lots of types and sizes of instances, for the demo will be using a free tier eligible instance type.
Then choose the Key-pair you want to use:
In the network settings, it allows us to select VPC to use, pick specific subnet to place EC2 instance into and it also selects the availability zone.
Auto Assign public IP: Public IP address allows accessing of the EC2 instance from the public internet
Need to configure the security group, which is like a firewall
In the storage configuration section, we can define our storage requirement:
We set up all the advanced options for EC2 instances in the advanced details section. (Leave it for now)
Now launch the instance, initially it will be pending, and over time it will change to running state, and the status check should be 2/2
All the details about this EC2 instance can be found in the tabs below:
Now, to connect to the instance, you can use the ‘Connect’ option as seen on the top right in the screenshot below:
Then choose SSH client, here you will need to follow the instructions to connect to the EC2 instance. Will need to use the SSH Key-Value pair that we have set up to connect to the instance. If you’re using a Mac, open the terminal server and follow these instructions:
This will then let you connect to the EC2 instance.
To clear this up:
Select the instance and terminate it.
Select the corresponding security group and delete it.
Subscribe to my newsletter
Read articles from Pooja Mehta directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
