# AWS CLI: Installation and Configuration

## **INTRODUCTION**

Amazon Web Services Command Line Interface `(AWS CLI)` is a powerful tool that enables users to interact with AWS services and manage their cloud resources from the command line. `AWS CLI` provides a command-line interface for AWS services, allowing developers, system administrators, and DevOps professionals to automate tasks, configure services, and perform various operations without the need for a graphical user interface.

The AWS Command Line Interface is an open-source tool that enables you to manage AWS services from the Command line. `AWS CLI` is a unified tool to manage your AWS services. It allows you to control multiple AWS services from the command line and automate them through scripts.

### **Step 1:**

Now, we will Install the AWS CLI on our local machine. `(In my case my local machine is Ubuntu.)`

### Firstly, we will update our system.

1. ```plaintext
        sudo apt-get update
    ```
    

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1695005436318/7acd1d34-4b5e-417b-b89d-c09219326792.png align="center")

### Now we will **Install AWS CLI**:

a. Open a terminal.

b. Run the following command to install AWS CLI using curl:

```plaintext
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
```

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1695022193140/a62cd11c-b2e6-4a4a-a35a-dcb4a21ab891.png align="center")

### Unzip the AWS CLI:

Unzip the file `awscli2.zip`

```plaintext
 unzip awscliv2.zip
```

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1695022387430/04bcaad5-8554-46b5-9cac-a98435ebdd43.png align="center")

After unzipping, we will see an AWS folder. Just go into the AWS folder using cd and then you will see an install file.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1695023037975/34076839-6589-4108-88e7-e79d73149848.png align="center")

### Install the `install` file :

`sudo ./install`

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1695023562522/19dcf34d-b1ee-45c4-89c0-b19bff313f93.png align="center")

After installation, you can verify it by running:

```plaintext
aws --version 
/usr/local/bin/aws --version
```

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1695023672477/1a2ef2a8-13c9-4015-80a0-f20aac89b4c0.png align="center")

## Step 2:

### We will configure the AWS CLI:

Enter the following command and press Enter:

`aws configure`

We have to enter the AWS Access Key ID:

We have to enter the AWS Secret Access Key:

Enter `default` Region Name:

Enter Default Output Format: (EG: 'json', 'text', 'table', 'yaml',yaml-stream):

(NOTES:- All this details you will get in your AWS Account)

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1695272265165/0608e016-9565-4a79-b967-72bc64fb774c.png align="center")

### In the last step: Check whether your aws cli is working or not just use:

`aws sts get-caller-identity`

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1695276196319/e6088b3b-e42a-4ad3-96b3-29d6afab9bfa.png align="center")
