AWS with CLI

What is the Command-line interface (CLI) and AWS (CLI)?

A command-line interface processes commands to a computer program in the form of lines of text. The program which handles the interface is called a command-line interpreter or command-line processor. Similarly, 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.

Why we use AWS CLI?

AWS CLI gives you the ability to automate the entire process of controlling and managing AWS services through scripts. These scripts make it easy for users to fully automate cloud infrastructure. Prior to AWS CLI, users needed a dedicated CLI tool for just the EC2 service.

In this Article we will see

1. How to Create a key pair through cli

  1. How to Create a security group
  2. Launching an instance using the above created key pair and security group.
  3. How we can create an EBS volume of 1 GB.
  4. The final step is to attach the above created EBS volume to the instance we created in the previous steps.

Prerequisites for this task

  1. Installed AWS version 2 on your os. If not use this link to download
  2. An AWS account.

ALl of the first we have to create IAM user

To create an access key for an IAM user

1. Sign in to the AWS Management Console and open the IAM console

2. Search for users and create one

3.We need to give permissions to a user to successfully authenticate with CLI.

4.After this step create a user and the Access Key and Secret key will be displayed

We have successfully created a user.

Now we will use command

aws configure

output -

Here we have to provide Access key and Secret key

Now to create a key pair we use command

For creating security group we will take help of aws document we will use command

aws ec2 help

after running this command we have to search command to create security group

Now over security group is created

After security we have to give inbounb rules

For Launching Ec2 we will use command -

Now we will creat EBS of 1gb

For this also we will take help of aws documents

Now for attaching the created EBS volume we will use command -

By this command this will attach succefully

Thanks for reading !!

☀️☀️☀️Have a good day☀️☀️☀️




Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

200+ laser cut trees, plants & Roses cnc vectors in dxf cdr formats for cnc pantograph, cnc router…

200+ laser cut trees, plants & Roses cnc vectors in dxf cdr formats for cnc pantograph, cnc router -Download

Docker and Kubernetes — root vs. privileged

Website Redesign: of Navbars and Pricavy PopUps

Graphs, networks and plans.

An efficient way to install and load R packages

An efficient way to install and load R packages

DevOps’ish 053: KubeCon, CloudNativeCon, Kubernetes, Looking to 2018, and MORE!

Incremental Development with Onion Models and GraphQL

DevOps Assembly lines Task 2.

Application Configuration Management with Tanka

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Ashish Dwivedi

Ashish Dwivedi

More from Medium

AWS Command Line Interface (AWS CLI)


Using AWS SAM to build and deploy — Beginner’s guide