Day 41: AWS CLI (Command line interface)

Day 41: AWS CLI (Command line interface)

#90daysofdevops

🚀Introduction

In this blog, we will explore what AWS CLI is and how to install it. We'll also look into the process of setting up an S3 bucket.


🔸What is AWS CLI

AWS CLI is a tool that pulls all the AWS services together in one central console, giving you easy control of multiple AWS services with a single tool. The acronym stands for Amazon Web Services Command Line Interface because, as its name suggests, users operate it from the command line. With it, you can control services manually or automate them with powerful scripts.


🔸First, install AWS CLI

  1. Visit here: https://aws.amazon.com/cli/

Click on the download link according to your OS.

I am installing it for Linux.

After clicking on it, you will see something like this, select according to your OS and copy-paste the command given in that.

Enter "aws --version" to see the version, if you see the output as below. It means AWS CLI is installed successfully.


🔸Now to use AWS CLI you have to authenticate it.

Create Access keys from the AWS Console

Click on the user in the top right corner of the console -> click on Security credentials.

Scroll down a bit and you see the "Access keys" section.

Click on "Create access keys".

Look at the picture below carefully to understand it better

Click on "Create Access keys".

Now you have Access Keys.

Come back to the command prompt and enter aws configure

Enter Access keys


🔸Let's use AWS CLI to create resources.

I created an S3 bucket in my AWS console Let's see if I can see which S3 buckets are there through CLI.

Enter "aws s3 ls" to list the s3 buckets for my account." to list the s3 buckets for my account.

Now create a new S3 bucket using AWS CLI.

A new S3 Bucket is created with the name "my-vishesh-bucket".

You can do all things using AWS CLI. If you want help with commands you can visit https://docs.aws.amazon.com/cli/latest/reference/

In this blog, we have see:

  1. How to Install AWS CLI.

  2. Authenticate AWS CLI to connect with your AWS account.

  3. Use AWS CLI to create resources (we create an S3 bucket).


Thanks for reading to the end; I hope you gained some knowledge.❤️🙌

Linkedln

Twitter

Github