How to Configure AWS EC2

Introduction

AWS Elastic Compute Cloud(EC2) delivers scalable infrastructure for companies that want to host cloud-based applications. It enables you to scale up or down the applications as per requirement.

Steps for creating an EC2 instance

  1. First create a budget in AWS console
  2. In, this we set up the Ubuntu 18.04 server instance
  3. Login to AWS Management Console
  4. Go to EC2 Section in AWS Console
  5. Click the “Launch Instance” button
  6. AMI is an Amazon Machine Image from which you can select multiple virtual machine images. The machine images are like templates that are configured with an operating system and other software that determine the user’s operating environment.
  7. Choose AMI, For learning, we can use “Free tier only”, enter the name of Your server in the Name box, press enter, then select the “Ubuntu Server 18.04” AMI.
  8. Select an instance type that meets your computing, memory, networking, or storage needs. We are using the free tier which is t2.micro.
  9. configure the security group which allows HTTP traffic then click “Review and Launch”
  10. We need a key pair to connect the Terminal to Ubuntu Server.
  11. Select “Create a new key pair”, enter a name for the key pair (e.g. “mern-pair”), and click “Download Key Pair” to download the private key, we will use this to connect to the server via SSH.
    Click “Launch Instance”, it will “View Instances” details of the new Ubuntu EC2 instance that is launching.

Connect local Machine Terminal to Ubuntu EC2 Instance via SSH(Secure Shell)

  1. PEM stands for Privacy Enhanced Mail. The PEM format is often used to represent keys.
  2. Open the terminal, and navigate towards the file which is the mern-pair.pem.
  3. If you are using Windows you can connect to your instance via SSH using the PuTTY SSH client. PuTTY(Popular SSH and Telenet Client) is a free and open-source terminal emulator, serial console and network file transfer application.
hetul

He has done his Masters in Computer Application from GLS. He is fond of playing Badminton & Billiards.
Hetul Parmar, Associate Software Engineer at GlobalVox. | Posted on: Aug 4, 2022