# Installing and configuring the AWS Command Line Interface (CLI)

> Install the AWS Command Line Interface in your account and set it up with your access keys to manage AWS services.

Source: https://helpcenter.ruachost.com/developers/guides/installing-and-configuring-the-aws-command-line-interface-cli/

The AWS CLI allows you to manage your Amazon Web Services account from the command line. This guide explains how to install and configure it on your account.

### Prerequisites

- An active AWS account. If you do not have one, create it at [http://aws.amazon.com](http://aws.amazon.com/).
- An AWS user with an Access Key and Secret Key. You create these by setting up a user group and user in the AWS console.

For guidance on creating users and obtaining keys, see:

- [Working with Groups and Users](http://docs.aws.amazon.com/IAM/latest/UserGuide/Using_WorkingWithGroupsAndUsers.html)
- [Managing Credentials](http://docs.aws.amazon.com/IAM/latest/UserGuide/ManagingCredentials.html)

### Installing the AWS CLI

1. **Log in via SSH** to your hosting account.
2. **Create a Python virtual environment**:

```
cd ~
virtualenv amazon
```

3. **Activate the virtual environment**:

```
source ~/amazon/bin/activate
```

- The command prompt changes to `(amazon)username@example.com`, indicating you are inside the virtual environment.

4. **Install the awscli package**:

```
pip install awscli
```

5. **Make the AWS CLI executable**:

```
chmod +x ~/amazon/bin/aws
```

### Configuring the AWS CLI

1. Run the configuration command:

```
aws configure
```

2. Enter the required details when prompted:

- **AWS Access Key ID:** Enter the AWS user's Access Key.
- **AWS Secret Access Key:** Enter the AWS user's Secret Key.
- **Default region name:** Press Enter to skip or specify a region.
- **Default output format:** Press Enter to skip or specify a format (e.g., json, text, table).

The AWS CLI is now configured for your account.

### Using the AWS CLI

- To view available commands:

```
aws help
```

For more information, visit [AWS CLI](https://aws.amazon.com/cli).
