🔅 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.
Step1: Install the AWS CLI program in your OS
Step 2: Here we are going to create a key pair. Using the command given below:
The key-pair has been successfully created.
Step 3: Now I am creating a security group for it
Now you can see the security group has been created.
But there are no inbound rules. So now I am adding a rule for the security group.
In the picture, you can see that I am creating an inbound rule for it.
In the first line, I have got an error because of the wrong port number because our port number comes in the range from 22–25. So use the second command for creating the inbound rule.
Now an inbound rule has been created for the security group
Step 4: Creating the instance using the key pair which I have created using the AWS CLI
Now the instance has been created and it is running successfully.
Step 5: After launching the instance I am creating an EBS volume of 1GB
The Ebs volume of 1 GB has been created. In the image, you can see the ebs volume of 1GB
has been created which is just below my pen drive-os
But this volume is not attached to any instance.
Step 6: Attaching the volume to the instance which I have created using the AWS-CLI.
Now the volume has been attached.