
I recently encountered this error while trying to run ‘kubectl’ commands over our AWS EKS cluster, not sure if it's shared by more k8s vendors.
In short, you are using an incompatible ‘AWS CLI’ version with your current AWS EKS version.
To fix it — Update your ‘AWS CLI’
For Linux x86 (64-bit)
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" && unzip awscliv2.zip && sudo ./aws/install
For MacOS
curl "https://awscli.amazonaws.com/AWSCLIV2.pkg" -o "AWSCLIV2.pkg"
sudo installer -pkg AWSCLIV2.pkg -target /
For Window
C:\> msiexec.exe /i https://awscli.amazonaws.com/AWSCLIV2.msi
Hope it helped. Cheers.
Thanks to Idan Asulin For the QA.