A beginners guide to Installing & Configuring the AWS Command Line Interface
The AWS CLI (Command Line Interface) provides a powerful tool for administering AWS. Far more functionality can be accessed via the command line than through the GUI console. It also enables automation and other abilities.
This article assumes you are using a Linux OS, for other operating systems or additional information please refer to the links throughout this document.
Installation:
Use pip (a package manager for Python software). Python is usually already installed on most Linux systems. Enter the following into a terminal or command line. It should complete quickly and easily.
sudo pip install awscli --ignore-installed six
If you have any trouble or are using a different OS refer to this document:
Installing the AWS Command Line Interface
Enable Tab Completion:
Locate the AWS Completer -
The location can vary depending on the installation method used. The path generally should be as show in this example, but use whatever path the check returns in the command to enable it.
which aws_completer
(example of path returned: /usr/local/bin/aws_completer )
Enable Command Completion -
complete -C '/usr/local/bin/aws_completer' aws
If you have trouble or need more information refer to the following document:
Command Completion
Configuration:
Before you can begin using the CLI you must configure it with your account information and some options.
If this command is run with no arguments, you will be prompted for configuration values such as your AWS Access Key Id and your AWS Secret Access Key. You can configure a named profile using the --profile argument.
Information you will need before you proceed:
- aws_access_key_id - The AWS access key part of your credentials
- aws_secret_access_key - The AWS secret access key part of your credentials
- Default region - us-east-1 (us-east-1 is just one possible example) Region List
- Default output format - Default output can be json, text, or table.
If you don't specify an output format, json will be used. Generally it should left at the default of json.
Running the Configuration:
At the command line run:
aws configure
You will be prompted to enter the information listed above and the process will be complete.
For more detailed information or to set up additional profiles refer to this article:
Configuring the AWS Command Line Interface
Setting up the AWS Shell:
The shell enables a GUI like system at the command line that offers suggestions for auto-complete among other things. This suggestion system provides a tool for getting familiar with the many commands available from the CLI.
For more information see the following article: Super-Charge Your AWS Command-Line Experience with aws-shell
Installation:
The aws-shell requires python and pip to install. You can install the aws-shell using pip:
pip install aws-shell
You should now be able to start the shell using the command:
aws-shell
For more information see this article:
aws-shell - The interactive productivity booster for the AWS CLI