Install the AWS CLI Using the Bundled Installer (Linux, macOS, or Unix)
On Linux, macOS, or Unix, you can also use the bundled installer to install the AWS CLI. The bundled installer includes all dependencies and can be used offline.
The bundled installer does not support installing to paths that contain spaces.
Linux, macOS, or Unix
Python 2 version 2.6.5+ or Python 3 version 3.3+
Check your installation:
If your computer doesn't already have Python installed, or you would like to install a different version of Python, follow the procedure in Install Python, pip, and the AWS Command Line Interface on Linux.
Install the AWS CLI Using the Bundled Installer
Follow these steps from the command line to install the AWS CLI using the bundled installer.
To install the AWS CLI using the bundled installer
Download the AWS CLI Bundled Installer.Copy
curl "https://s3.amazonaws.com/aws-cli/awscli-bundle.zip" -o "awscli-bundle.zip"
Unzip the package.Copy
If you don't have
unzip, use your Linux distribution's built in package manager to install it.
Run the install executable.Copy
sudo ./awscli-bundle/install -i /usr/local/aws -b /usr/local/bin/aws
By default, the install script runs under the system default version of Python. If you have installed an alternative version of Python and want to use that to install the AWS CLI, run the install script with that version by absolute path to the Python executable. For example:Copy
/usr/local/bin/python2.7awscli-bundle/install -i /usr/local/aws -b /usr/local/bin/aws
The installer installs the AWS CLI at
/usr/local/aws and create the
aws at the
/usr/local/bin directory. Using
-b option to create a symlink eliminates the need to specify the install
directory in the user's
$PATH variable. This should enable all users to call the
AWS CLI by typing
aws from any directory.
To see an explanation of the
-b options, use the
Install the AWS CLI Without Sudo (Linux, macOS, or Unix)
If you don't have sudo permissions or want to install the AWS CLI only for the current user, you can use a modified version of the above commands:
curl "https://s3.amazonaws.com/aws-cli/awscli-bundle.zip" -o "awscli-bundle.zip"$
./awscli-bundle/install -b ~/bin/aws
This installs the AWS CLI to the default location (
and create a symbolic link (symlink) at
~/bin/aws. Make sure that
~/bin is in your
PATH environment variable for the symlink
echo $PATH | grep ~/bin// See if $PATH contains ~/bin (output will be empty if it doesn't) $
export PATH=~/bin:$PATH// Add ~/bin to $PATH if necessary
To ensure that your $PATH settings are retained between sessions, add the
export line to your shell profile (~/.profile, ~/.bash_profile, etc).
The bundled installer does not put anything outside of the installation directory except the optional symlink, so uninstalling is as simple as deleting those two items.
sudo rm -rf /usr/local/aws$
sudo rm /usr/local/bin/aws