How to Create AWS EC2 Instance Using Cloud Formation

Share via:

Dear Readers,

In this article, we will see the following Create AWS EC2 Instance Using Cloud Formation.

Steps to Follow :
  1. Logging to AWS Account
  2. Create a Key Pair
  3. Create Stack for creating AWS EC2
  4. Verify EC2 Instance Graphically
  5. Connect to EC2 Instance Using Putty

 

1. Logging to AWS Account

First, we need to AWS Console page by using the below link.

https://aws.amazon.com/console/

Click on sign in to Console button. Logging to aws account

Login using username & password and click on sign in. Enter to AWS Management Console

We can see the AWS Management Console Dashboard. Go to Services, under the compute module click EC2 service to open.

2. Create a New Key Pair

Go to keypairs and click on Create key pair.

Specify key pair Name “ktexperts_key” and select file format “ppk” and click on create key pair.

Once click on create key pair the file will be downloaded automatically in your physical location.

We can the key pair “ktexperts_key” which was created.

3. Create Stack for creating VPC

Go to Services, under the Management & Governance module click Cloud Formation service to open.

Click on Create stack.

Upload template file

Select Template is ready and click on Upload a template file.

select file “createec2.yml” and click on open.

the file has uploaded and click on Next.

Specify stack stack name “ktexperts-vpc” and click on Next.

click on Next.

Click on Create stack.

we can see the vpc creating is being in progress, It will take time to create.

We can see the vpc “ktexperts-vpc” has created successfully.

4. Verify EC2 in Graphically

Go to Services, under the Networking & Content Delivery module click EC2 service to open.

we can see the instance “Ktexperts-EC2” which was created.

5. Connect to Linux EC2 Instance Using Putty

We can connect putty by using below link. Connect to EC2 Instance Using Putty

We can see the Linux EC2 Instance Terminal.

Script for Creating an EC2 Instance:

 

Thank you for giving your valuable time to read the above information.
Follow us on 
Website  www.ktexperts.com
Facebook Page KTexperts
Linkedin Page : KT EXPERTS

Follow Me
Ramesh’s Linkedin : Ramesh Atchala

 

 

 

Share via:
Note: Please test scripts in Non Prod before trying in Production.
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...

Add Comment