Creating EC2 Instances with pre-created Substitutes….

Ashutosh Rai
3 min readJul 8, 2021

Hey connections, today we are going to create an ec2 instance with pre-created substitutes like key-pair, security group, etc… A complete description of the task is:-

🔅 Create a key pair

🔅 Create a security group

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

🔅 Create an EBS volume of 1 GB.

🔅 The final step is to attach the above created EBS volume to the instance you created in the previous steps.

So let’s ready guys we can use the following steps to do this task,

Step 1:- Creating Key Pair

Step 2:- Create a Security group

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

Select AMI
t2 micro
default setting
default 8 gib for root
tags
Pre-created Security Group (my_sg)
Review and launch
Pre-created key-pair (my_new_key)
Launched

Step 4:- Let’s see the instance details and its conf

Step 5:- Creating new EBS volume & attaching it to ec2 instance

Note AZ of the volume should be same as Instance
Volume created
Attaching to instance
Selecting instance

Step 6:- Starting instance to see the newly attached volume

1 Gib volume created

We can format & attach this volume to any directory to use this storage.

So, that’s all for this we have achieved what we need.

If you have any queries please ping me.

Keep Sharing & Keep Learning…….

--

--