While working with Amazon Web Services (AWS) it is essential to have command line utility installed on the machine to perform the administration or development activities. Below we will find steps for the AWS CLI Installation on Linux.
AWS CLI Installation Steps
Download the AWS CLI binary zip file
awscli-exe-linux-x86_64.zipfrom the AWS website.
Login as root user on the Linux machine to perform the installation.
sudo su - root
Create directory where you want to extract above zip file.
Extract binaries with following command.
cd /path/to/extract/binaries unzip awscli-exe-linux-x86_64.zip
Execute following command from the current working directory to perform the installation.
If you try to install binaries without
rootuser then you would get following error.
mkdir: cannot create directory ‘/usr/local/aws-cli’: Permission denied
AWS CLI will get installed inside default directory
AWS CLI may not be accessible to all users due to insufficient permissions. If you get below error while running aws cli despite of having
PATHthen use below command to grant
RWXto AWS CLI Binaries to let non root user access it.
aws: command not found
chmod -R 777 /usr/local/aws-cli/
Confirm the installation by checking version.
aws --version aws-cli/2.0.28 Python/3.7.3 Linux/3.10.0-1127.el7.x86_64 botocore/2.0.0dev32
We learned how to install AWS CLI in Linux Machine. These steps will be common for all Linux distros like RHEL, Fedora, Ubuntu, Debian, Raspbian etc.