Y NOT — Launch an EC2 Instance in AWS Cloud Platform

Login to AWS Console and choose Services →EC2 which would land onto EC2 Dashboard.

Under Instances -> Click Launch Instances

Step 1: Choose an Amazon Machine Image (AMI). I am preferring Amazon Linux 2 AMI (HVM), SSD Volume Type

Step 2: Choose an Instance Type. I am preferring t2.micro of 1GiB memory which comes under free tier usage

Step 3: Configure Instance Details. Based on your needs, configure the instance details like no of instances, VPC on which EC2 Instance to be launched, subnet settings etc

Step 4: Add Storage. I am preferring 8 GiB of EBS (SSD Volume).

Step 5: Add Tags which are key value pairs. I am adding just a Name tag for now.

Step 6: Configure Security Group. You have options to link any existing security group or you can create a new security group. A security group acts as a virtual firewall for your EC2 instances to control incoming and outgoing traffic. Here I am creating a new security group that allows only SSH Connectivity from any Source IPs and blocks all other means of connectivity.

Step 7: Review Instance Launch. We would need to review all the configuration details and then if everything is good, we can launch the instance.

Part of this step, we have to provide the key pairs (either existing one or we can create new key pairs as below for SSH connectivity).

EC2 Instance is up and running now.

In order to connect to this EC2 Instance remotely, we have two options.

Option 1: Connect using EC2 Instance Connect.

Option 2: Connect using Putty. Putty allows to connect remotely to other Linux machines via SSH. Putty don’t load pem files (which are public keys generated for AWS). So we need to convert pem files to ppk files. Then, we can login to EC2 instances from putty remotely.

Conversion from .pem File to .ppk File using PuttyGen

  1. Open PuttyGen, choose conversions → import key and choose the pem file.

2. Once pem file is loaded, click save private key and click yes for the prompt. This will store the private key in ppk format which can be used for SSH remote connectivity via Putty.

Details of the EC2 Instance like user name and public IP can be found by clicking on the Instance ID of the EC2 Instance

Here we are with our first EC2 Instance launched!

Software Craftsman who loves to explore and evolve