How to Install AWS CLI on Arch Linux

Last updated Wednesday, February 18, 2026 4:34 pm Joshua James 12 min read

AWS CLI lets you manage AWS services directly from the terminal. Script deployments, sync data to S3, query CloudWatch logs, trigger Lambda functions, and control EC2 instances without opening the AWS Console. To install AWS CLI on Arch Linux, four installation methods are available across the official extra repository, the official AWS installer, and the AUR.

Install AWS CLI on Arch Linux

Arch Linux offers four installation options for AWS CLI. The official extra repository now provides aws-cli-v2 for integrated pacman-managed v2, and the older aws-cli package for v1. The official AWS installer delivers AWS CLI v2 as a pre-built binary that AWS maintains directly, installed outside of pacman. The AUR package aws-cli-bin provides AWS CLI v2 as a community-packaged binary that fits into yay or paru workflows.

MethodChannelVersionUpdatesBest For
Pacman (aws-cli-v2)Arch Extra Reposv2 (latest)Automatic via pacman -SyuMost users — integrated Arch package management with v2
Official InstallerAWS Officialv2 (latest)Manual via re-run scriptProduction systems and v2-specific features like IAM Identity Center SSO
AUR (aws-cli-bin)AURv2 (latest)Via yay or paruUsers who want v2 with AUR helper management
Pacman (aws-cli)Arch Extra Reposv1 (latest)Automatic via pacman -SyuLegacy: specific v1 compatibility requirements only

Choose Pacman (aws-cli-v2) for the simplest path to AWS CLI v2 with full pacman integration and automatic rolling updates. Opt for the official installer when you want AWS-maintained binaries or need the very latest v2 release ahead of the Arch repos. Use the AUR when you prefer managing AWS CLI through yay or paru alongside other AUR packages. The aws-cli v1 pacman package remains available for legacy compatibility but does not receive new features.

AWS CLI v2 is the actively developed branch and is recommended for all new setups. The Arch extra repository now provides aws-cli-v2 directly, making it the simplest v2 option for most Arch users. The aws-cli v1 package remains in the repos for compatibility but receives only maintenance and security updates, not new features.

Update Arch Linux

Synchronize the package databases and upgrade all installed packages before installing new software:

sudo pacman -Syu

This refreshes your local package database and applies pending updates. On a rolling release, staying current avoids dependency conflicts when installing new packages.

This guide uses sudo for commands that need root privileges. If your user is not in the sudoers file yet, run the commands as root or follow the guide on how to add and manage sudo users on Arch Linux.

Method 1: Install AWS CLI v2 via Pacman

The official Arch Linux extra repository provides aws-cli-v2, a fully packaged AWS CLI v2 that integrates with Arch’s rolling release and updates automatically with pacman -Syu. This is the recommended pacman installation method for most Arch users.

sudo pacman -S aws-cli-v2

Pacman resolves all required dependencies and places the aws binary at /usr/bin/aws alongside the aws_completer helper. The aws-cli-v2 package conflicts with aws-cli and cannot be installed alongside it.

Verify the Installation

Confirm AWS CLI is installed and accessible:

aws --version

Expected output:

aws-cli/2.33.22 Python/3.14.3 Linux/6.6.87.2-microsoft-standard-WSL2 source/x86_64.arch.20260208

Your version number, kernel string, and Python version will reflect your running system. The 2.x series confirms v2 is installed, and source/ in the build string indicates the Arch-compiled package rather than an AWS pre-built binary. Version numbers advance automatically as Arch rolls out updates.

If you specifically need AWS CLI v1, install the legacy aws-cli package instead: sudo pacman -S aws-cli. Note that aws-cli and aws-cli-v2 conflict and cannot be installed simultaneously. AWS CLI v1 receives only maintenance and security updates, not new features.

Method 2: Install AWS CLI via the Official Installer

The official AWS installer provides AWS CLI v2 as a pre-built binary. This method works independently of your system Python installation and receives direct maintenance from AWS.

Install Dependencies

Install the tools needed to download and extract the installer:

sudo pacman -S curl unzip

curl downloads the installer archive and unzip extracts it. Both packages are available in the official Arch repositories and are not installed by default on minimal systems.

Download the AWS CLI Installer

Download the latest AWS CLI v2 installer for Linux:

curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o awscliv2.zip

The -o flag saves the file with the specified name in your current directory. A progress indicator shows the download status.

These commands use the x86_64 installer. Check your architecture with uname -m. If you see aarch64, download https://awscli.amazonaws.com/awscli-exe-linux-aarch64.zip instead.

Extract and Run the Installer

Extract the archive and run the installation script:

unzip awscliv2.zip
sudo ./aws/install

The installer places binaries in /usr/local/aws-cli and creates symlinks at /usr/local/bin/aws and /usr/local/bin/aws_completer. A confirmation message appears when installation succeeds:

You can now run: /usr/local/bin/aws --version

Clean up the downloaded files:

rm -rf awscliv2.zip aws/

Verify the Installation

Confirm that AWS CLI v2 is installed and accessible:

aws --version

Expected output:

aws-cli/2.33.24 Python/3.13.11 Linux/6.6.87.2-microsoft-standard-WSL2 exe/x86_64.arch.20260208

Your version number, kernel string, and build date will differ based on the current release and your system. The exe/ portion of the trailing string confirms the official installer build, and arch identifies the Arch Linux target.

Method 3: Install AWS CLI via AUR

The aws-cli-bin AUR package provides AWS CLI v2 as a pre-built binary managed through your AUR helper. This approach delivers v2 while keeping AWS CLI in your yay or paru workflow alongside other AUR packages.

aws-cli-bin is a community-maintained AUR package, not an official Arch Linux or AWS package. Review the PKGBUILD before installing, as recommended for all AUR packages. This guide assumes you have yay or paru already installed. If not, install one of these AUR helpers and install base-devel and git first: sudo pacman -S --needed base-devel git.

Install the package using your preferred AUR helper:

Using yay:

yay -S aws-cli-bin

Using paru:

paru -S aws-cli-bin

The AUR helper downloads the PKGBUILD, builds, and installs the package. The aws-cli-bin package downloads the official AWS CLI v2 pre-built binary and installs it as a pacman-managed package, placing the aws binary at /usr/bin/aws.

Verify the Installation

Confirm that AWS CLI v2 is installed correctly:

aws --version

Expected output (version reflects what the AUR maintainer has packaged at install time):

aws-cli/2.33.24 Python/3.13.11 Linux/6.6.87.2-microsoft-standard-WSL2 exe/x86_64.arch.20260208

The 2.x series confirms the AUR package installs AWS CLI v2. Your version and kernel string will differ based on your system and the current AUR package version.

Configure AWS CLI on Arch Linux

AWS CLI requires credentials and default settings before it can interact with your AWS account. Configuration applies regardless of which installation method you used and is stored in ~/.aws/config (region and output preferences) and ~/.aws/credentials (access keys).

Quick Configuration

Start the interactive configuration wizard:

aws configure

Provide four values when prompted:

AWS Access Key ID [None]: AKIAIOSFODNN7EXAMPLE
AWS Secret Access Key [None]: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
Default region name [None]: us-east-1
Default output format [None]: json

Replace the example credentials with your actual AWS access key ID and secret access key from your IAM user. For the region, enter the AWS region closest to you or where your resources reside. Valid output formats include json, yaml, yaml-stream, text, and table.

To create AWS access keys, log into the AWS Console, navigate to IAM > Users > Security credentials > Create access key. Apply the principle of least privilege when setting key permissions, and never commit access keys to version control or share them.

Verify Configuration

Check which credentials and region AWS CLI will use for commands:

aws configure list
      Name                    Value             Type    Location
      ----                    -----             ----    --------
   profile                <not set>             None    None
access_key     ****************3456 shared-credentials-file
secret_key     ****************EKEY shared-credentials-file
    region                us-east-1      config-file    ~/.aws/config

The masked access key and secret key confirm that credentials are loaded from ~/.aws/credentials. Test authentication by querying your account identity:

aws sts get-caller-identity
{
    "UserId": "AIDACKCEVSQ6C2EXAMPLE",
    "Account": "123456789012",
    "Arn": "arn:aws:iam::123456789012:user/username"
}

Values will differ on your account. A valid JSON response confirms authentication is working. If credentials are not configured, AWS CLI reports: Unable to locate credentials. You can configure credentials by running "aws configure".

Multiple Profiles

AWS CLI supports named profiles for managing separate AWS accounts or roles. Add a named profile:

aws configure --profile production

This stores credentials and settings under the production profile. Use it with the --profile flag:

aws s3 ls --profile production

Commands without --profile use the default profile automatically. You can also set a profile for all commands in a session with export AWS_PROFILE=production.

Common AWS CLI Commands on Arch Linux

These examples demonstrate everyday AWS CLI operations. Commands work identically across all installation methods once credentials are configured. For the full service reference, see the AWS CLI Command Reference.

S3 Operations

List all S3 buckets in your account:

aws s3 ls

Upload a file to an S3 bucket:

aws s3 cp localfile.txt s3://bucket-name/

Sync a local directory to S3, uploading only changed files:

aws s3 sync ./local-directory s3://bucket-name/remote-directory

The sync command efficiently handles incremental updates, making it useful for backup scripts and static site deployments from your Arch workstation.

EC2 Instance Management

List all EC2 instances in your default region:

aws ec2 describe-instances

Filter for running instances only and display as a table:

aws ec2 describe-instances --filters "Name=instance-state-name,Values=running" --output table

Stop a specific EC2 instance:

aws ec2 stop-instances --instance-ids i-1234567890abcdef0

Replace i-1234567890abcdef0 with your actual instance ID from describe-instances.

IAM User and Policy Management

List all IAM users in your account:

aws iam list-users

Create a new IAM user:

aws iam create-user --user-name new-user

Attach a managed policy to a user:

aws iam attach-user-policy --user-name new-user --policy-arn arn:aws:iam::aws:policy/ReadOnlyAccess

For a complete command reference and service-specific documentation, see the AWS CLI Command Reference. The AWS CLI GitHub repository contains release notes and the changelog for both v1 and v2.

Update AWS CLI on Arch Linux

Update procedures differ by installation method. Use the same approach you used to install.

Update Pacman Installation

Arch’s rolling release model updates AWS CLI as part of regular system upgrades:

sudo pacman -Syu

To upgrade only the AWS CLI package without a full system upgrade:

sudo pacman -S aws-cli-v2

Confirm the new version after upgrading:

aws --version

Update Official Installer

Download the latest installer and run it with the --update flag:

curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o awscliv2.zip
unzip awscliv2.zip
sudo ./aws/install --update

If the installed version already matches the downloaded version, the installer skips the update:

Found same AWS CLI version: /usr/local/aws-cli/v2/2.33.24. Skipping install.

Otherwise, the installer replaces the existing version and preserves your ~/.aws/ configuration. Clean up afterwards:

rm -rf awscliv2.zip aws/
aws --version

Update AUR Installation

Update aws-cli-bin using your AUR helper:

Using yay:

yay -Su aws-cli-bin

Using paru:

paru -Su aws-cli-bin

To include aws-cli-bin in a full AUR upgrade alongside all other AUR packages, run yay -Syu or paru -Syu without specifying a package name.

Troubleshoot AWS CLI on Arch Linux

Command Not Found After Installation

If aws returns “command not found” after using the official installer, the symlink at /usr/local/bin/aws may be missing or your PATH does not include /usr/local/bin.

Verify the symlinks exist:

ls -la /usr/local/bin/aws /usr/local/bin/aws_completer
lrwxrwxrwx 1 root root 37 Feb 18 07:30 /usr/local/bin/aws -> /usr/local/aws-cli/v2/current/bin/aws
lrwxrwxrwx 1 root root 47 Feb 18 07:30 /usr/local/bin/aws_completer -> /usr/local/aws-cli/v2/current/bin/aws_completer

If the symlinks are missing, recreate them manually:

sudo ln -s /usr/local/aws-cli/v2/current/bin/aws /usr/local/bin/aws
sudo ln -s /usr/local/aws-cli/v2/current/bin/aws_completer /usr/local/bin/aws_completer

If the symlinks exist but aws is still not found, check that /usr/local/bin is in your PATH:

echo $PATH

If /usr/local/bin is absent, add it to your shell configuration and reload:

echo 'export PATH="/usr/local/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc

Authentication Errors

If AWS CLI commands fail with authentication errors, verify your credentials are configured and correctly formatted:

aws configure list

Credentials showing <not set> mean no credentials are loaded. Run aws configure to set them. Also verify the credentials files exist and have restrictive permissions:

ls -la ~/.aws/
total 8
drwxr-xr-x  2 user user 4096 Feb 18 08:00 .
drwxr-x--- 25 user user 4096 Feb 18 08:00 ..
-rw-------  1 user user   29 Feb 18 08:00 config
-rw-------  1 user user  116 Feb 18 08:00 credentials

Credentials require 600 permissions to prevent unauthorized access. Fix incorrect permissions:

chmod 600 ~/.aws/credentials ~/.aws/config

If permissions and credentials look correct but errors persist, the access key may be expired or revoked. Generate a new key from the IAM console and run aws configure again.

SSL Certificate Errors

SSL errors typically indicate missing CA certificates or a system clock that is too far out of sync. Update the CA certificates bundle first:

sudo pacman -S ca-certificates

Then verify your system time is accurate, since certificate validation requires correct time:

timedatectl status

If NTP synchronization is inactive, enable it:

sudo timedatectl set-ntp true

Remove AWS CLI from Arch Linux

Remove AWS CLI using the same method you used for installation. Configuration files in ~/.aws/ are not removed by any of these commands and can be cleaned up separately if needed.

Remove Pacman Installation

Remove AWS CLI and its orphaned dependencies:

sudo pacman -Rns aws-cli-v2

The -Rns flags remove the package, its no-longer-needed dependencies, and any saved configuration files (pacsave files). Verify the removal:

aws --version
bash: aws: command not found

Remove Official Installer

The official installer installs outside of pacman, so removal requires manually deleting the installed files and symlinks.

The following commands permanently delete the AWS CLI installation directory under /usr/local. Verify the paths before running rm -rf.

sudo rm /usr/local/bin/aws
sudo rm /usr/local/bin/aws_completer
sudo rm -rf /usr/local/aws-cli

Verify removal:

aws --version
bash: aws: command not found

Remove AUR Installation

Remove the aws-cli-bin package through your AUR helper or pacman directly:

Using yay:

yay -Rns aws-cli-bin

Using paru:

paru -Rns aws-cli-bin

Both commands remove the package and its orphaned dependencies. Verify removal by checking the version:

aws --version
bash: aws: command not found

Remove Configuration Files (Optional)

AWS CLI stores credentials and profiles in ~/.aws/. Remove these files only if you no longer need saved profiles or credentials.

Back up your configuration first if you might need saved profiles later:

cp -r ~/.aws ~/.aws-backup

This permanently deletes all AWS CLI configuration files including credentials, named profiles, and CLI history. This action cannot be undone.

rm -rf ~/.aws

Frequently Asked Questions

What is AWS CLI?

AWS CLI (Amazon Web Services Command Line Interface) is a unified tool that lets you manage AWS services from a terminal. Instead of navigating the AWS Console, you run commands to create, configure, and automate resources across services like S3, EC2, IAM, Lambda, and CloudFormation. A single installation covers the full AWS service catalog.

What is the difference between AWS CLI v1 and v2?

AWS CLI v2 is the current major release and introduces IAM Identity Center (SSO) authentication, improved auto-pagination, binary file handling improvements, and better tab completion. v1 remains functional and receives maintenance updates but does not get new features. On Arch Linux, the aws-cli-v2 pacman package and the AUR aws-cli-bin provide v2; the legacy aws-cli pacman package provides v1. Most common AWS tasks work identically on both versions.

Does the aws-cli package in the Arch Linux repositories install v1 or v2?

The aws-cli package in the Arch Linux extra repository installs AWS CLI v1. Arch Linux now also provides the aws-cli-v2 package in the extra repository, which installs AWS CLI v2 and is the recommended pacman option for new setups. The official AWS installer and the aws-cli-bin AUR package also provide v2. Note that aws-cli and aws-cli-v2 conflict and cannot be installed simultaneously.

Conclusion

AWS CLI is installed on Arch Linux and ready to manage your AWS infrastructure from the terminal. Configure credentials with aws configure and verify connectivity with aws sts get-caller-identity. For cloud development on Arch Linux, Docker on Arch Linux, Git on Arch Linux, and OpenSSH on Arch Linux pair well with AWS CLI workflows.

Found this guide useful?

Support LinuxCapable to keep tutorials free and up to date.

Buy me a coffee Buy me a coffee

Before commenting, please review our Comments Policy.
Formatting tips for your comment

You can use basic HTML to format your comment. Useful tags currently allowed:

You type Result
<code>command</code> command
<strong>bold</strong> bold
<em>italic</em> italic
<a href="URL">link</a> link
<blockquote>quote</blockquote> quote block

Leave a Comment

We read and reply to every comment - let us know how we can help or improve this guide.

Let us know you are human: