Symptom: You install AWS CLI v2 but aws --version still shows v1.x.x.

Cause: An older aws.exe appears earlier in your PATH than the new CLI. On Windows, the system uses the first match it finds.

Quick Check

Run:

where aws

You might see:

C:\Users\YourName\anaconda3\Scripts\aws
C:\Users\YourName\anaconda3\Scripts\aws.cmd
C:\Program Files\Amazon\AWSCLIV2\aws.exe

The first path is always used (in this example, Anaconda’s AWS CLI v1).

Two Fixes

1. Remove the Old CLI

If installed via conda:

conda remove awscli

If installed via pip:

pip uninstall awscli

Then, confirm by running:

where aws

You should now see only:

C:\Program Files\Amazon\AWSCLIV2\aws.exe

And aws --version should show 2.x.x.

2. Reorder PATH

If you can’t remove the old CLI:

  • Open System Properties → Environment Variables → Path.
  • Move: C:\Program Files\Amazon\AWSCLIV2\ above any Python or Anaconda paths.
  • Restart your terminal and run aws --version again.