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 awsYou might see:
C:\Users\YourName\anaconda3\Scripts\aws
C:\Users\YourName\anaconda3\Scripts\aws.cmd
C:\Program Files\Amazon\AWSCLIV2\aws.exeThe 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 awscliIf installed via pip:
pip uninstall awscliThen, confirm by running:
where awsYou should now see only:
C:\Program Files\Amazon\AWSCLIV2\aws.exeAnd 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.