Aws using Command-line Interface

Minshu Kumar
Oct 19, 2020

Hey guys ,

Here we are going to using the was service using the command line interface of the AWS.

We are going to create the following thing using CLI:-

  1. Create a Keypair
  2. Create a Security Group
  3. Launching 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.

The first step is to install the AWS from the internet and set the environmental path and configure the AWS in the command line using access key and private key generating while creating users in the AWS WebUI.

Use the Below command shown for creating a key pair.

Step1:-

Step 2 is to create the security group using below command

Now we require to run the instance of the AWS cloud using the AWS CLI.For that we require ebs block, security group, keypair, and also need to provide the tag

The following command is used to create the instance:-

Now we are going to create the ebs volume which we gonna this to attach it to the running instance

In below image we can clearly see the volume is created in the web ui.

And here is the instance which is creating when we launched the instance.

Now we attach the volume to the instance with the following command

This is how it works using CLI and this helps in the automation with the AWS cloud.

Thank you

--

--