AWS Command Line Interface
User Guide (Version 0.4.4)
« PreviousNext »
View the PDF for this guide.Go to the AWS Discussion Forum for this product.Did this page help you?  Yes | No |  Tell us about it...

Getting Set Up with the AWS Command Line Interface

Before you can start using the AWS Command Line Interface, you must sign up for an AWS account (if you don't already have one) and set up your environment. The following sections provide step-by-step instructions.

Sign Up

To access AWS, you will need to sign up for an AWS account.

To sign up for an AWS account

If you already have an AWS account, go ahead and skip to the next section: Check Prerequisites. Otherwise, follow these steps.

  1. Go to http://aws.amazon.com, and then click Sign Up.

  2. Follow the on-screen instructions.

    Part of the sign-up procedure involves receiving a phone call and entering a PIN using the phone keypad.

AWS sends you a confirmation email after the sign-up process is complete. At any time, you can view your current account activity and manage your account by going to http://aws.amazon.com and clicking My Account/Console.

When you sign up, AWS provides you with security credentials that are specific to your account. Two of these credentials, your access key ID and your secret key, are used by the SDK whenever it accesses the services provided by AWS. The security credentials authenticate requests to the service and identify you as the sender of a request. The following list shows examples of these credentials.

  • Access Key ID Example: AKIAIOSFODNN7EXAMPLE

  • Secret Access Key Example: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY

To view your AWS access credentials

  1. Go to the Amazon Web Services website at http://aws.amazon.com.

  2. Click My Account/Console, and then click Security Credentials.

  3. Under Your Account, click Security Credentials.

  4. In the spaces provided, type your user name and password, and then click Sign in using our secure server.

  5. Under Access Credentials, on the Access Keys tab, your access key ID is displayed. To view your secret key, under Secret Access Key, click Show.

Your secret key must remain a secret that is known only to you and AWS. Keep it confidential in order to protect your account. Store it securely in a safe place, and never email it. Do not share it outside your organization, even if an inquiry appears to come from AWS or Amazon.com. No one who legitimately represents Amazon will ever ask you for your secret key.

The credentials that are returned from the sign-up process are your root credentials. In general, we recommend that you do not use your root credentials for most interactions with AWS. Your root credentials provide complete access to your AWS account including your billing information. You should always keep your root credentials as secure as possible and use them only when necessary. Instead of using your root credentials, we recommend that you create an IAM user with only the permissions necessary to perform the desired AWS tasks. For information about how to create an IAM user, go to the Identity and Access Management documentation.

Check Prerequisites

To use the AWS CLI, your system must meet the following prerequisites:

  • Operating system: Linux/UNIX, Mac OS X, Windows XP or greater

  • Python 2.6 or greater. We recommend that you use the most recent Python 2.7.x version.

  • Tools for installing and managing Python packages: easy_install and pip.

Install Prerequisites

If you are using Linux/UNIX, or Mac OS X, you might already have Python, easy_install, and pip on your computer.

To see if you have Python, type the following at a command prompt:

python --version

To see if you have easy_install, type the following at a command prompt:

easy_install --help

You might need to specify the complete path for easy_install. For example, on Windows, you might need to type:

c:\Python27\Scripts\easy_install.exe --help

To see if you have pip, type the following at a command prompt:

pip --help

As with easy_install, you might need to specify the complete path for pip. For example, on Windows, you might need to type:

c:\Python27\Scripts\pip.exe --help

To install Python

  1. Download and install the Python package for your operating system: Download Python

  2. Verify the Python installation by typing the following at a command prompt:

    python --help

If Python appeared to install correctly but does not return help, you may need to add the location of the Python executable to your PATH environment variable.

Note

Do not use the Cygwin version of Python because its installation is not compatible with easy_install.

To install easy_install

  1. Download and install the easy_install Python package for your operating system.

    Note

    If you are using Windows, you can obtain and install easy_install by downloading the .exe package for Setuptools, which includes easy_install. For example, if you are using Python 2.7, you would download and install setuptools-0.6c11.win32-py2.7.exe from Setuptools and EasyInstall.

  2. Verify the easy_install installation by typing the following at a command prompt:

    easy_install --help

If you are using Windows, you must update your path with the directory where easy_install was installed, which defaults to the Scripts subdirectory of the Python installation directory. For example, if you installed Python 2.7 to C:\Python27, you would add the path C:\Python27\Scripts to your PATH environment variable.

To install Pip

  1. To install pip using EasyInstall, type the following at a command prompt:

    easy_install pip
  2. Verify pip installation by typing the following at a command prompt:

    pip --help

If you are using Windows, you must update your path with the directory where pip was installed, which defaults to the Scripts subdirectory of the Python installation directory. For example, if you installed Python 2.7 to C:\Python27, you would add the path C:\Python27\Scripts to your PATH environment variable.

Once you've met these prerequisites, you are ready to install the AWS CLI.

Install the AWS CLI

The AWS CLI is packaged as awscli and is installed using either easy_install or pip.W

To install the AWS CLI using easy_install type the following at a command prompt:

easy_install awscli

To install the AWS CLI using pip type the following at a command prompt:

pip install awscli