AWS-CLI____(task_3)

AnujGupta
3 min readMar 19, 2021

🔰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. The final step is to attach the above created EBS volume to the instance you created in the previous steps.

Lets start ,

First we have to create Key pair So we log in to aws cli configure credentials and searched for commands as we have to create key it should come under ec2 or we can see documentation for the same .

Now creating security group, anuj3SecurityGroup .

Using the key and security group id we created , launching instance .

Done we can confirm on aws_cli or aws_web_portol .

Done : launched instance with the key and security group we created.

Now , ebs volume of 1 gb ,

Done

ERROR OCCURED : volume and instance are not in the same AZ,

So in aws ebs volume and the instance on which we have to attach the volume shold be in same AZ.

we can describe instance and see the AZ (ab-south-ab)

Also of the EBS volume (ab-south-1a)

Creating volume in ab-south-1b .

Done .

Now attaching again,

Successfully attched .

Thanks for reading this article ,

--

--