The AWS Command Line Interface (AWS CLI) manages S3, EC2, IAM, and the rest of your AWS account from the shell. AWS CLI v2 is the current line—installed from Amazon’s official Linux bundle or, on recent Debian releases, the awscli apt package.
This guide covers install AWS CLI on Debian for Debian 11 (Bullseye), 12 (Bookworm), and 13 (Trixie): the official v2 installer, apt install awscli, optional legacy pip, credential setup, verification, and uninstall. I ran these steps on Debian 13 and kept real terminal output below.
Tested on: Debian 13 (trixie); kernel 6.12.94+deb13-amd64; amd64; official aws-cli/2.35.11; apt aws-cli/2.23.6.
aws binary on PATH. The official installer places /usr/local/bin/aws; apt places /usr/bin/aws. If both exist, which aws follows PATH order—not necessarily the newer build.
Choose an install method
| Method | Best for | On test host (trixie) |
|---|---|---|
| Official v2 zip | Latest upstream; matches AWS docs | 2.35.11 → /usr/local/bin/aws |
apt install awscli |
Debian-maintained updates in main | 2.23.6-1 → /usr/bin/aws |
pip install awscli |
Legacy v1 only—not recommended | Not tested (no pip on minimal VM) |
Amazon’s getting started install guide targets the v2 bundle. On Trixie, Debian’s awscli package is also v2—not the old PyPI-only v1 era.
Prerequisites
- Debian 11, 12, or 13 on x86_64 (ARM: use
awscli-exe-linux-aarch64.zipfrom AWS). - sudo for install steps.
- curl or wget for the official bundle.
unzipfor the AWS zip:sudo apt install unzip.- AWS account credentials when you run service commands (not required for
aws --version).
Check current state:
. /etc/os-release && echo "$PRETTY_NAME"
command -v aws || echo "aws: not installed"
apt-cache policy awscli | head -8Before install on the test host:
Debian GNU/Linux 13 (trixie)
aws: not installed
awscli:
Candidate: 2.23.6-1
2.23.6-1 500
500 http://deb.debian.org/debian trixie/main amd64 PackagesInstall AWS CLI v2 from the official bundle (recommended)
Steps from Install the AWS CLI on Linux:
sudo apt install -y curl unzip
curl -fsSL "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o /tmp/awscliv2.zip
unzip -q /tmp/awscliv2.zip -d /tmp
sudo /tmp/aws/install
aws --version
which aws-rw-r--r-- 1 root root 70M Jun 29 09:43 /tmp/awscliv2.zip
You can now run: /usr/local/bin/aws --version
aws-cli/2.35.11 Python/3.14.5 Linux/6.12.94+deb13-amd64 exe/x86_64.debian.13
/usr/local/bin/awsUpgrade an existing official install:
sudo /tmp/aws/install --updateLayout:
/usr/local/bin/aws -> /usr/local/aws-cli/v2/current/bin/aws
/usr/local/aws-cli/v2/2.35.11/Install AWS CLI from Debian apt
On Debian 13, awscli in main provides AWS CLI v2:
sudo apt update
sudo apt install -y awscli
aws --version
dpkg -l awscli | grep ^iiSetting up awscli (2.23.6-1) ...
aws-cli/2.23.6 Python/3.13.5 Linux/6.12.94+deb13-amd64 source/x86_64.debian.13
ii awscli 2.23.6-1 amd64 Unified command line interface to Amazon Web Servicesapt-cache show awscli | grep -E '^Package:|^Version:|^Description-en'Package: awscli
Version: 2.23.6-1
Description-en: Unified command line interface to Amazon Web ServicesOn Bookworm and Bullseye, run apt-cache policy awscli—the candidate version may differ or the package may be absent; use the official bundle when apt is too old or missing.
Verify the installation
Version and path:
aws --version
type -a aws
aws help | head -8aws-cli/2.35.11 Python/3.14.5 Linux/6.12.94+deb13-amd64 exe/x86_64.debian.13
aws is /usr/local/bin/aws
aws is /usr/bin/aws
AWS() AWS()
NAME
aws -
DESCRIPTION
The AWS Command Line Interface is a unified tool to manage your AWS
services.API call without credentials (expected failure):
aws sts get-caller-identityaws: [ERROR]: An error occurred (NoCredentials): Unable to locate credentials.That error means the CLI is installed; configure credentials next.
Configure AWS credentials
Interactive setup:
aws configureYou will be prompted for:
- AWS Access Key ID
- AWS Secret Access Key
- Default region (for example
us-east-1) - Default output format (
json,table, ortext)
Files are written under ~/.aws/. For IAM roles on EC2, SSO, or environment variables, see Configuration and credential file settings.
Legacy pip install (AWS CLI v1 — avoid for new systems)
Older guides use pip install awscli (Cyberciti, Ask Ubuntu threads). That installs v1, which AWS has superseded with v2.
On a minimal Debian image without pip:
pip3: command not found
/usr/bin/python3: No module named pipIf you must use pip for a legacy workflow:
sudo apt install -y python3-pip
pip3 install awscli --userPrefer the official v2 bundle or apt install awscli on Trixie. See also install Python on Debian if you are building a Python toolchain.
PATH when both installs exist
If you install official v2 and apt install awscli:
echo "$PATH" | tr ':' '\n' | head -5
which aws
/usr/local/bin/aws --version
/usr/bin/aws --versionaws is /usr/local/bin/aws
aws-cli/2.35.11 ...
aws-cli/2.23.6 Python/3.13.5 .../usr/local/bin usually precedes /usr/bin, so the newer official build runs by default. Remove one install or adjust PATH if you need the Debian package exclusively.
Update AWS CLI
| Channel | Command |
|---|---|
| Official bundle | Download a fresh zip; sudo /tmp/aws/install --update |
| Debian apt | sudo apt update && sudo apt install --only-upgrade awscli |
Confirm with aws --version. List packages with list installed packages on Debian.
Uninstall AWS CLI
Official v2 bundle
The install script does not support --uninstall (AWS uninstall guide):
Got an unexpected argument: --uninstallRemove manually:
sudo rm -rf /usr/local/aws-cli
sudo rm -f /usr/local/bin/aws /usr/local/bin/aws_completerDebian apt package
sudo apt remove --purge awscli
sudo apt autoremoveAfter removing only the official build, /usr/bin/aws from apt may remain:
aws-cli/2.23.6 Python/3.13.5 Linux/6.12.94+deb13-amd64 source/x86_64.debian.13
/usr/bin/awsTroubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
aws: command not found |
Not installed | Official bundle or sudo apt install awscli |
unzip: command not found |
Missing unzip | sudo apt install unzip |
Wrong aws --version |
Two installs on PATH | type -a aws; remove one or fix PATH |
NoCredentials on first API call |
Normal before aws configure |
Run aws configure or set env vars |
Package awscli has no installation candidate |
Older suite without package | Use official zip installer |
pip awscli vs v2 confusion |
Legacy v1 path | Use official v2 or apt awscli on Trixie |
| Download fails behind proxy | Network / TLS | Set https_proxy; verify curl works |
References
- AWS CLI — Getting started install
- AWS CLI v1 Linux install (legacy)
- AWS CLI — Uninstall v2
- awscli package on Debian
- LinuxCapable — Install AWS CLI on Debian
- On-site: install curl on Debian, install sudo on Debian, apt command, wget, list installed packages
Summary
Install AWS CLI on Debian with Amazon’s official v2 zip (curl the bundle, unzip, sudo ./aws/install) for the latest release (2.35.11 here), or sudo apt install awscli on Trixie for Debian’s v2 package (2.23.6). Verify with aws --version, configure with aws configure, and keep one aws on PATH. Remove the official build with rm -rf /usr/local/aws-cli or drop the apt package with apt remove awscli.

