AWS - COMMAND LINE INTERFACE

AWS - COMMAND LINE INTERFACE

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


In this article we do above all steps by aws-cli

Step-1 : check aws cli in installed or not.

cmd - aws
No alt text provided for this image

Step-2 : configure the aws

cmd - aws configure

No alt text provided for this image

By creating IAM through GUI (give power user access) we got Access key and Secret key .

Then we have to provide our region name.

Step 3 : create key pair

By run a command "aws help " , we get all the available functions

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


cmd - aws ec2 create-key-pair --key-name awscli

No alt text provided for this image

we successfully created key pair , we can also check this by GUI.

No alt text provided for this image


Step 4 : Create a security group

In aws help we have option for creating the security group

No alt text provided for this image
No alt text provided for this image
cmd - aws ec2 create-security-group --description "cli-securitygroup" --group-name cli-securitygroup

No alt text provided for this image

 we successfully created the security group , we can also check this by GUI

No alt text provided for this image


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

  • we have to choose which instance we launch and give its image id
  • we have to give instance type as t2.micro (free - tier)
  • then we give security group id and key name.
No alt text provided for this image


No alt text provided for this image


by GUI we can also check.




Step 6 : Create an EBS volume of 1 GB

aws ec2 create-volume --availability-zone ap-south-1a --size 1

No alt text provided for this image
by GUI we can check


by GUI we can also check.




Step 7 : attach the above created EBS volume to the instance we created in the previous steps.

aws ec2 attach-volume --device /dev/xvda  --instance-id i-0f5cd03a917c59914 --volume-id  vol-019ae1f7ef6ab04ed


by this we can attach the volume to instance

and by GUI we can also check this.

Hence we successfully done the below task by AWS CLI

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.


Thank You

  • CHIRAG NAGORI



To view or add a comment, sign in

More articles by Chirag Nagori

  • GUI On Docker

    Hello everyone , this article is about how we can run GUI programs like Firefox , Gedit editor..

    4 Comments
  • AWS CLOUDFRONT - CLI

    What is CloudFront ? Amazon CloudFront is a content delivery network operated by Amazon Web Services. Content delivery…

    7 Comments
  • Kubernetes Use Cases

    This article tell you about the use case of kubernetes i.e.

    13 Comments
  • Pinging to Google but not Facebook from same system

    This article tell about , we can ping to google.com but not able to ping with facebook.

    10 Comments
  • How AI help in Corporate World

    This article tell you How the big MNC's are get benifited from Artificial Intelligence . As we all know artificial…

    6 Comments
  • How companies are benifited from AWS

    Q) What is cloud ? Cloud computing is the delivery of computing services like servers, storages and more over the…

    8 Comments

Others also viewed

Explore content categories