Checking the installed AWS CLI version confirms which client build a shell is actually running before troubleshooting failed commands, comparing automation behavior across hosts, or deciding whether a host still needs an upgrade.
The aws command prints one compact version line when run with --version. The leading aws-cli/x.y.z token shows the CLI release that the shell resolved first, while the rest of the line identifies the bundled runtime and platform details that help distinguish one install from another.
Because AWS CLI versions 1 and 2 can both appear as aws, a shell can report an unexpected version when multiple installers or leftover symlinks are still present in PATH. AWS also documents behavior differences between v1 and v2, so the safe follow-up when the returned line looks wrong is to confirm the active binary path before upgrading, removing, or reusing the command in scripts.
Related: How to install AWS CLI on Ubuntu
Related: How to install AWS CLI on CentOS or Red Hat
Related: How to install AWS CLI on Windows
Related: Install AWS CLI version 1 using pip
Steps to check AWS CLI version:
- Print the installed AWS CLI version from the shell session that normally runs AWS commands.
$ aws --version aws-cli/2.34.18 Python/3.13.12 Darwin/25.3.0 source/arm64
If the shell returns a command-not-found or PATH error instead of a version line, the active session cannot see an AWS CLI install yet.
Related: How to install AWS CLI on Ubuntu
Related: How to install AWS CLI on CentOS or Red Hat
Related: How to install AWS CLI on Windows - Read the first token in the output to confirm whether the shell is running AWS CLI v2 or the older v1 client.
v2 example: aws-cli/2.34.18 Python/3.13.12 Darwin/25.3.0 source/arm64 v1 example: aws-cli/1.44.68 Python/3.12.3 Linux/6.12.76-linuxkit botocore/1.42.78
aws-cli/2.x identifies the current AWS CLI v2 line, while aws-cli/1.x identifies AWS CLI v1, which AWS documents separately and treats as a different release line for migration and compatibility planning.
- Resolve the exact executable path when the reported version is not the install that should be active.
$ command -v aws /usr/local/bin/aws $ ls -l $(command -v aws) lrwxr-xr-x@ 1 user admin 32 Mar 28 14:26 /usr/local/bin/aws -> ../Cellar/awscli/2.34.18/bin/aws
Multiple installers can leave different aws binaries in PATH, so the path check explains unexpected v1 versus v2 results.
On Windows, use where aws in Command Prompt or Get-Command aws in PowerShell to inspect the active executable path.
- List every matching aws command on the current PATH when an upgrade, uninstall, or package-manager change still leaves the shell on the wrong version.
$ type -a aws aws is /usr/local/bin/aws aws is /opt/homebrew/bin/aws
Multiple results usually mean more than one AWS CLI install is still present, so the first match in PATH may not be the intended v2 or v1 binary.
- Run the version check again after fixing PATH or reinstalling and stop when the returned line matches the expected major release and executable path.
$ aws --version aws-cli/2.34.18 Python/3.13.12 Darwin/25.3.0 source/arm64
Related: Check the current caller identity
Mohd Shakir Zakaria is a cloud architect with deep roots in software development and open-source advocacy. Certified in AWS, Red Hat, VMware, ITIL, and Linux, he specializes in designing and managing robust cloud and on-premises infrastructures.
