How to Install AWS CLI on Linux
You can download and install the AWS CLI v2 on Linux as follows. This works on most x86_64 Linux distributions including Ubuntu, Amazon Linux, and CentOS.
Perform the install
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip awscliv2.zip
sudo ./aws/install
Verify the install
aws --version
You should see something like aws-cli/2.x.x Python/3.x.x Linux/... confirming it’s installed correctly.
After installation, run aws configure to set up your access key, secret key, and default region. If you’re on an EC2 instance with an IAM role attached, you can skip the credentials setup — the CLI will automatically use the instance role.
For ARM-based systems (like AWS Graviton instances), replace x86_64 with aarch64 in the download URL.