aws: error: argument command: Invalid choice / Unknown options
The AWS CLI doesn’t recognise the command or option — usually CLI v1 vs v2 differences, an old CLI version, or a typo.
Seen on:
AWS
Meaning
New services and flags need a recent CLI. CLI v2 changed some behaviours (binary format, paging, pip install vs installer). An old aws on the PATH can shadow the new one.
Common causes
- CLI too old for the service/command
- v1 installed instead of v2
- Typo or wrong subcommand order
- Old binary earlier on PATH
⚡ Quick fix
- Check aws --version and which -a aws
- Install/upgrade CLI v2
- Read aws <service> help for valid options
Detailed fix by platform
Shell
- bash
aws --version which -a aws curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o awscliv2.zip && unzip -q awscliv2.zip && sudo ./aws/install --update
How to diagnose
- Version — aws --version
- PATH — which -a aws
🔧 Still not fixed?
Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:
Similar errors
Most viewed in AWS
Other ways to find it
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
Was this page helpful?
Report a correction or suggest an improvement
Last updated 7 Oct 2026