I have installed the AWS CLI around 6 moths back and upgraded using the following command today.
pip install --upgrade awscli
The current version on my Ubuntu 18.04 machine is:
aws-cli/1.14.44 Python/3.6.5 Linux/4.15.0-23-generic botocore/1.8.48When I try aws eks command, I am getting the following error:
Invalid choice: 'eks', maybe you meant:
* es
Is my aws cli is upgraded properly or should I install something else for EKS service?
I was trying to connect to the cluster from a diff aws profile. So ideally we should use the same IAM profile for running kubectl from local so that the heptio-authenticator-aws will be happy.
All this not worked for you then
pip uninstall awscli
sudo rm -rf /usr/local/aws
pip3 install awscli --upgrade --user aws --version aws-cli/1.18.39 Python/3.6.9 Linux/4.15.0-1065-aws botocore/1.15.39
if this is older version(aws-cli/1.18.39) then it won't work for you
This happens when we install aws-cli using apt packages as below.
sudo apt-get install awsclibecause by default it will install 1.14 aws-cli version. Therefore my recommendation is to use pip3 to install aws-cli to your machine. It always installs the latest aws-cli version.
pip3 install --upgrade --user awscliI had the same issue on El Capitan 10.11.6 and the only one worked solution was this:
sudo pip install awscli --ignore-installed six
Version 6 comes with distutils in El Capitan
Reference: https://github.com/aws/aws-cli#installation
Solutions mentioned did not resolve my issue - this link helped me out in figuring the issue.
aws --versiondisplayed a version which was not the latest. EKS was introduced with version 1.15.32 - which means my version did not know EKS at all. Uninstalling and reinstalling did not work either, path was referring to some older version previously installed somewhere else. The solution was following installation instructions here followed by updating the path variable
the issue cannot be resolved until the aws --version command shows you any version less than 1.15.32.
The other solutions may be additional fixes needed afterwards, yet they will not work with an earlier version either.
I faced the same issue because my current aws cli version was old (as shown below)
$aws --version
aws-cli/1.14.44 Python/3.6.8 Linux/4.15.0-58-generic botocore/1.8.4Upgrading the awscli version helped to resolve the issue
$pip3 install --upgrade --user awscli
$aws --version
aws-cli/1.16.252 Python/3.6.8 Linux/4.15.0-58-generic botocore/1.12.242Here is the link to upgrade awscli https://docs.aws.amazon.com/cli/latest/userguide/install-linux-al2017.html
Please check with the AWS region you configured for the AWS CLI you installed. AWS EKS is available only on US East (N. Virginia) and US West (Oregon). Do check it properly and configure the same for AWS CLI.