We can simply install awscli using pip. Pip is a package management system used to install and manage software packages written in Python.

Check pip is already installed on your machine.

pip --version
pip 1.5.4 from /usr/lib/python2.7/dist-packages (python 2.7)


If it is not installed, please install pip.

pip installation steps

curl -O https://bootstrap.pypa.io/get-pip.py


The script downloads and installs the latest version of pip.

python get-pip.py --user


Next step is important. We need to add the local bin location to the current PATH variable.


To list current PATH details:

echo $PATH


Add the executable path to your PATH variable: ~/.local/bin

export PATH=~/.local/bin:$PATH


This command adds a path, ~/.local/bin in this example, to the current PATH variable.


Load the profile into your current session

source ~/.profile


You can find the shell’s profile script in your user folder.


Installing the AWS CLI with Pip

pip install awscli --upgrade --user


You can use the above command to upgrade awscli tool.

Verify that the AWS CLI installed correctly:

$ aws --version
aws-cli/1.14.37 Python/2.7.6 Linux/4.4.0-111-generic botocore/1.8.41


Add the executable path to your PATH variable: ~/.local/bin

export PATH=~/.local/bin:$PATH


This command adds a path, ~/.local/bin in this example, to the current PATH variable.

Load the profile into your current session.

source ~/.profile
 

To see more details about aws command line interface tool:

  aws help
  aws command help
  aws command subcommand help
Was this answer helpful? 0 Users Found This Useful (0 Votes)