EC2

How to launch EC2 instance in AWS

How to launch EC2 instance in AWS

Hello! In this post we will see how to launch AWS EC2 instance in the cloud  and how to connect . It’s very simple . You can launch in GUI graphical mode . Also you can launch from AWS CLI or through API calls as well.

In this example we will launch Redhat Linux instance .

  • Select the region where you would like launch the EC2 instance . Oregon selected for this example.

  • Click “ Launch Instance”  in the EC2 Dashboard screen and click Next
  • Select the Operating System you would like to install .Select Redhat Linux 7.3

  • Select the EC2 instance type . t2.micro is free tier eligible instance type . Depends upon requirement you can choose the instance type.
  • Note – You can not increase the memory or CPU in the existing system type . You have option to upgrade to next instance family type.

  • “Configure Instance “This is the one of the important setting we need to provide .In this section need to fill below important details. Most of them are network related like which VPC subnet instance need to launch and public IP assignment details . IAM role ,monitoring and system shutdown behavior you can define here.
  •  Enable ” Protect against accidental terminate” .So if you click the terminate button by mistake , instance will not be terminated .You have to manually disable protection option first.

  • Allocate the Storage space for operating system and other disk requirements and select the disk type. AWS offering various disk types for didderent workload for different price.So you can choose depends on your requirements. SSD and provisioned SSD disk types are costlier than other disk types.

  • Add tag details . Nags very useful to categorize the servers easily . You can assign same tag to the multiple server .Ex .If you have 500 servers running if you like to filter web servers alone you can easliy filter by tage name.

  • Click Create Security group . Ex “web-server-sg” . Security group act as a firewall.In this example ssh allowed from “my ip” and port 80 http allowed for everyone. So all other ports bydeault its blocked . you need to open manually for all required ports.ALlOutbound port is open by default.

  • Select continue with magnetic boot volume disk . You can choose other disk type also but cost may include.

  • Review your configuration once again and click “Launch”

  • Click create new pair and provide the name for it , then download the keypair.If you have existing key pair you can use the same . The same key pair can be used with multiple servers.
  • Click Launch Instance

  • Launch Status. EC2 instance launched successfully.

  • Server tagged “web server” initializing now.

  • The key pair file you have downloaded is in .pem format .You need to convert into .ppk file when you are connecting through putty .If you are connecting from some linux client you can connect directly with .pem file.
  • Click Load files in the putty Generator

  • Change the type to all files

  • Select the .pem file which downloaded during instance launch.

  • Click “Save Private Key “

  • Save the key in .ppk format

  • Note the public IP address to connect. Note public ip address may  be change when you stop and start the instance . So its not static IP address. If you need static public IP address allocate Elastic IP to your instance.

  • Open the putty , then enter the server public IP address
  • Load the private ppk file as shown below.

 

  • Accept the connection security alert

  • default user name “ec2-user” .Password no need to provide since keypair is loaded.
  • Now your connected your AWS Linux EC2 instance.

Tagged

Leave a Reply

Your email address will not be published. Required fields are marked *