AWS COMMAND LINE INTERFACE

AWS COMMAND LINE INTERFACE

What is AWS CLI ?

The AWS Command Line Interface (CLI) is a unified tool to manage your AWS services. With just one tool to download and configure, you can control multiple AWS services from the command line and automate them through scripts.

Task Description :

  • 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.

Step 1 : Create a key pair

No alt text provided for this image

Step 2 : Create a security group 

No alt text provided for this image

Add rules in the security group rules using the following command

aws ec2 authorize-security-group-ingress --group-name sgforssh --protocol tcp --port 22 --cidr 0.0.0.0/0

To check whether the security group created or not :

No alt text provided for this image

Here we can see that the security group created which allows SSH from any IP's of the world. By default all the ports allowed in egress.

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

No alt text provided for this image

Step 4 : Create an EBS volume of 1 GB

No alt text provided for this image

Step 5 : Attach the volume to the instance which is created previously

No alt text provided for this image

To verify that volume is attached to the instance use the following command :

No alt text provided for this image
No alt text provided for this image

To delete the volume created we must first terminate the instance , to stop , terminate instance and delete the volume use the following commands :

No alt text provided for this image
No alt text provided for this image
No alt text provided for this image


To view or add a comment, sign in

More articles by Venu Dadi

Others also viewed

Explore content categories