Creating AWS EC2 Instance using CLI

Prakhar Lad
Nov 15, 2020

1.Create a key pair.

2.Create a security group.

3.Launch an instance using the above created key pair and security group.

4.Create an EBS volume of 1 GB.

5.Attach the above created EBS volume to the instance we have just created.

Creating a key pair

Creating a Security Group

Launching an instance

By using above key pair and security group, we will now create an instance using same CLI and along with that, we will later on confirm with the WebUI that whether our instance has been successfully created or not.

Firstly, we have to create a rough perspective of how our code should be in the CLI

Now, we will put the above command in the CLI

We can see that our instance has been successfully created:

Creating an EBS Volume of 1GB and Attaching it our instance

Final step, to create an EBS volume of 1GB and attaching it to our instance:

Checking that our EBS volume of 1GB is successfully created

Thank you guys for your precious time.

Hope you likes it!!!

Happy Learning!

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

No responses yet

Write a response