How to install and configure the AWS Command Line Interface (CLI)

This article describes how to install the Amazon Web Services Command Line Interface (AWS CLI) on your A2 Hosting account. 

If you have not already set up an Amazon Web Services (AWS) account, you must do so before following the procedures below. To set up an Amazon AWS account, please visit

Using AWS CLI at A2 Hosting

To access an AWS account from your A2 Hosting account, you set up a virtual environment for Python, and then install and configure the awscli package.

Before you do this, however, you must log in to the AWS console and create a user group and a user. When you do this, AWS generates the user's Access key and Secret key. You must provide both of these keys during the awscli package configuration process.

Installing and configuring the awscli package

The awscli Python package enables you to access an AWS account from the command line. To install and configure the awscli package on your A2 Hosting account, follow these steps:

  1. Log in to your account using SSH.
  2. To create the Python virtual environment, type the following commands at the command prompt:
    cd ~
    virtualenv amazon
  3. To activate the virtual environment, type the following command:

    source ~/amazon/bin/activate
    The command prompt changes to (amazon)[email protected] to indicate that you are running within a virtual environment.
  4. To install the awscli package, type the following command:

    pip install awscli
  5. To make the awscli program executable, type the following command:

    chmod +x ~/amazon/bin/aws
  6. To configure the awscli package for access to your AWS account, type the following command:

    aws configure
  7. At the AWS Access Key ID prompt, type the AWS user's Access key and then press Enter.
  8. At the AWS Secret Access Key prompt, type the AWS user's Secret key and then press Enter.
  9. At the Default region name prompt, press Enter.
  10. At the Default output format prompt, press Enter. The AWS CLI is now configured for your account.

    To view a list of commands available with the AWS CLI, type the following command at the command prompt:

    aws help

More Information

For more information about the AWS CLI, please visit

Did you find this article helpful? Then you'll love our support. Experience the A2 Hosting difference today and get a pre-secured, pre-optimized website. Check out our web hosting plans today.

We use cookies to personalize the website for you and to analyze the use of our website. You consent to this by clicking on "I consent" or by continuing your use of this website. Further information about cookies can be found in our Privacy Policy.