# AWS CLI Basics: A Beginner’s Tutorial

### Install AWS CLI

Download and Install it from the [official AWS CLI installation guide](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html).

### Run aws configure

```bash
$ aws configure

aws configure --profile myprofile
AWS Access Key ID [None]: YOUR_ACCESS_KEY_ID
AWS Secret Access Key [None]: YOUR_SECRET_ACCESS_KEY
Default region name [None]: us-west-2
Default output format [None]: json
```

### Verify Configuration

```bash
aws configure list
```

### Configuration Files

**AWS configure command stores your** `credentials` **&** `configuration` **settings in two files located in the ~/.aws directory:**

* **~/.aws/credentials:** Stores your AWS access key ID and secret access.
    
* **key.~/.aws/config:** Stores your default region and output format.
    

### Remove Credentials from Configuration File

**Manually remove the credentials from the configuration file**

* Open the `~/.aws/credentials` file (on Unix-based systems) or `C:\Users\`[`USERNAME.aws`](http://USERNAME.aws)`\credentials` (on Windows).
    
* Delete the `[default] section or any other named profile section` that contains your credentials.
    

### Unset Environment Variables

**If you have set your AWS credentials using environment variables, you can unset them:**

```bash
unset AWS_ACCESS_KEY_ID
unset AWS_SECRET_ACCESS_KEY
unset AWS_SESSION_TOKEN
```

### Delete AWS CLI Cache

```bash
rm -rf ~/.aws/cli/cache
```

Feel free to share and spread the knowledge! 🌟😊 Enjoy Learning! 😊
