Next: Install the AWS CLI version 1 on macOS, Previous: CLI Version 2, Up: Installing the CLI [Index]
AWS CLI version 1 is the original AWS CLI, and we continue to support it. However, major new features that are introduced in AWS CLI version 2 might not be backported to AWS CLI version 1. To use those features, you must install AWS CLI version 2.
You can install the AWS CLI version 1 using any of the following techniques:
You can find the version number of the most recent CLI at:
In this guide, the commands shown assume you have Python v3 installed and the pip commands shown use the pip3 version.
For offline or automated installations on Linux or macOS, we recommend that you try the bundled installer. The bundled installer includes the AWS CLI, its dependencies, and a shell script that performs the installation for you.
The pip package manager for Python provides an easy way to install, upgrade, and remove Python packages and their dependencies.
The AWS CLI is updated frequently with support for new services and commands. To determine whether you have the latest version:
If you already have pip and a supported version of Python, you can install the
AWS CLI by using the following command. If you have Python version 3
installed, we recommend that you use the pip3
command.
$ pip3 install awscli --upgrade --user
The #+texinfo:@upgrade{–upgrade}@@ option tells pip3
to upgrade any
requirements that are already installed. The @texinfo:@option{–user} option
tells pip3
to install the program to a subdirectory of your user directory to
avoid modifying libraries used by your operating system.
We recommend that you regularly check to see if there is a new version of the AWS CLI and upgrade to it when you can.
Use the pip3 list -o
command to check which packages are "outdated".
$ aws --version aws-cli/1.16.273 Python/3.7.3 Linux/4.14.133-113.105.amzn2.x86_64 botocore/1.13.0 $ pip3 list -o Package Version Latest Type ---------- -------- -------- ----- awscli 1.16.170 1.16.198 wheel botocore 1.12.160 1.12.188 wheel
Because the previous command shows that there is a newer version of the AWS CLI
available, you can run pip3 install --upgrade
to get the latest version.
$ pip3 install --upgrade --user awscli
If you encounter issues when you attempt to install the AWS CLI with pip3
,
you can install the AWS CLI in a virtual environment to isolate the tool and
its dependencies. Or you can use a different version of Python than you
normally do.
After you install the AWS CLI, you might need to add the path to the executable file to your PATH variable. For platform-specific instructions, see the following topics:
Verify that the AWS CLI installed correctly by running
$ aws --version
Before you can run a CLI command, you must configure the AWS CLI with your credentials.
You store credential information locally by defining profiles in the AWS CLI configuration files, which are stored by default in your user’s home directory.
The AWS CLI is updated regularly to add support for new services and commands. To update to the latest version of the AWS CLI, run the installation command again. For details about the latest version of the AWS CLI:
$ pip3 install awscli --upgrade --user
If you need to uninstall the AWS CLI, use pip uninstall.
$ pip3 uninstall awscli
Next: Install the AWS CLI version 1 on macOS, Previous: CLI Version 2, Up: Installing the CLI [Index]