In this blog post, we will learn how to install the AWS CLI command-line utility on Ubuntu 20.04 server.
In my case, I have not changed the default configuration of OS or settings.
Install
If you check the AWS documentation, you will see that AWS doesn’t recommend installing the package in a specific location. In this post, I will create a hidden directory called .aws and install the CLI into it.
Create Directory
Let us start with creating a new directory called .aws in our come directory.
cd
mkdir .aws
Install Unzip
Next, we need to install unzip in order to extrect the CLI. use the following command to install unzip.
sudo apt install unzip
Download and Unzip AWS CLI
Now, let’s download the CLI using the following command. Please make sure you download it to the .aws directory.
sudo curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
When the download is completed unzip the file.
unzip awscliv2.zip
Install and Test
The final step is to install the AWS CLI using the following comamnd.
sudo ./aws/install
By default AWS will install the CLI in the following path.
/usr/local/bin/aws
To check the AWS CLI version type:
aws --version
Comments
4 responses to “Install AWS CLI on Ubuntu 20.04”
[…] default, AWS will create a credential file for us when we run the aws configure command using AWS CLI; however, you might not be able to run the aws configure wizard in some […]
[…] the previous articles, we learned how to create a credentials file and install AWS CLI tools. For Terraform to work with AWS, you will need both; however, running the aws […]
[…] we start, you will need AWS CLI installed and configured with a credential file or aws configure […]
[…] the following example, I will run an AWS CLI command to retrieve all the buckets that I have. From the list, I will note one bucket name and […]