The AWS Command Line Interface (CLI) is one of the ways to interact with AWS services. We will be showcasing CLI commands to use certain services in forthcoming chapters. So, as a prerequisite, we will install the AWS CLI on our machine.
Installing the AWS CLI
Windows
To install the AWS CLI on Windows, we can install it directly by using MSI Installer or by using pip (package manager for Python). We will demonstrate the installation using MSI Installer:
- Download the installer from the following link, as per your machine's compatibility:
- 64-bit: https://s3.amazonaws.com/aws-cli/AWSCLI64.msi
- 32-bit: https://s3.amazonaws.com/aws-cli/AWSCLI32.msi
- Execute MSI Installer and follow the instructions.
- Once installed, you can check the installation by using the following command:
aws --version
The following output should be visible on the command line. The version may vary if you are installing older or later versions:
Figure 1.9: AWS CLI version
Linux
To install the AWS CLI on a Linux machine, we need to install pip (a package manager for Python):
- Download the script for installing pip:
curl -O https://bootstrap.pypa.io/get-pip.py
- Install pip:
python get-pip.py -user
- Add the pip installation path in the environment variables:
export PATH=~/.local/bin:$PATH
- Verify the pip installation:
pip --version
- Install the AWS CLI:
pip install awscli --upgrade --user
- Once installed, you can check the installation using the following command:
aws -version
The following output should be visible on the command line. The version may vary if you are installing older or later versions:
Figure 1.10: AWS CLI version - Linux