eks option is not available in AWS CLI. How to install it? - amazon-web-services

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.48
When 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 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 --version
displayed 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.

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.

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.4
Upgrading 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.242
Here is the link to upgrade awscli
https://docs.aws.amazon.com/cli/latest/userguide/install-linux-al2017.html

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.

This happens when we install aws-cli using apt packages as below.
sudo apt-get install awscli
because 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 awscli

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

Related

How can I upgrade AWS SAM to a certain version?

I'm trying to upgrade SAM CLI, version 1.18.2 to 1.22.0 on Ubuntu 20.04. I used brew command:
~brew upgrade aws-sam-cli#1.22.0
but didn't work. Showed the next message:
Error: No available formula or cask with the name "aws-sam-cli#1.22".
Also I'm trying to find a downloadable to install a certain version.
Thanks for your help!
https://github.com/aws/aws-sam-cli/issues/1767
For anyone in the future, use pip.
pip3 install --user 'aws-sam-cli==1.12.0'

AWS CLI VERSION UPGRADE

I have installed AWS CLI latest version using "sudo pip install --upgrade awscli " .
this has successfully updated my aws cli version but for only root users, but for all remaining users , it is showing version as previous one only, If I run the command without sudo then its saying permission denied.
If my server has multiple linux users and want to update my aws cli version from 1.16.3 to 1.18.223 for all users, how can I do it ?
Please help me .
Thank in advance
You can adjust the path where you want to install, the binary.
Install the AWS CLI version 1 using the bundled installer with sudo
curl "https://s3.amazonaws.com/aws-cli/awscli-bundle-1.18.223.zip" -o "awscli-bundle.zip"
unzip awscli-bundle.zip
sudo ./awscli-bundle/install -i /usr/local/aws -b /usr/local/bin/aws
Just curious when you are upgrading the AWS Cli why not the latest which is backward compatible and probaly more options
Try not to install pip packages with sudo. Better use a Creating virtual environments

How to install latest awscli using yum on CentOS 7?

I installed on CentOS 7 awscli using this command:
yum install awscli
But it turned out that it is old version of awscli:
awscli.noarch 1.14.28-5.el7_5.1
How could I update or install using yum on CentOS 7 to get awscli 1.18?
AWS documentation here clearly mentions as below. Looks like it is not recommended to use the yum appraoch.
Although the awscli package is available in repositories for other package managers such as apt and yum, these are not produced, managed, or supported by AWS. We recommend that you install the AWS CLI from only the official AWS distribution points, as documented in this guide.

-bash: aws: command not found

I'm on macOS Mojave Version 10.14.5.
I was following the instructions here
Installing the AWS CLI
when I got to the part to type
aws --version
in terminal, and got the response
-bash: aws: command not found
Here's a screenshot of terminal
I looked at the other posts similar to this on stackoverflow, but they seem to apply to different contexts. They have not helped.
you need to install python and pip on your mac in order to install the awscli.
After the installation of python and pip, please use following command to install aws cli with latest version from AWS.
sudo pip install awscli --force-reinstall --upgrade
Install python version 3 or higher And Use this command to download aws cli with python3
curl "https://s3.amazonaws.com/aws-cli/awscli-bundle.zip" -o "awscli-bundle.zip"
unzip awscli-bundle.zip
sudo /usr/local/bin/python3 awscli-bundle/install -i /usr/local/aws -b /usr/local/bin/aws
use AWS official guide here to ensure you are installing the latest version.
I have mac and this fixed the issue
$ curl "https://awscli.amazonaws.com/AWSCLIV2.pkg" -o "AWSCLIV2.pkg"
$ sudo installer -pkg AWSCLIV2.pkg -target /
This command works good for me
sudo apt install awscli

libpcre.so.0 missing on AWS AMI

I recently installed PostgreSQL Server at my AWS AMI EC2 instance.
I used this answer to guide me through the right RPM package.
Everything is working fine, however, now when I try to install Postgis with sudo yum install postgis23_95.x86_64 I receive:
Error: Package: postgis23_95-2.3.7-1.rhel6.x86_64 (pgdg95)
Requires: libpcre.so.0()(64bit)
I cannot manage to fix this error. I also tried sudo yum install pcre-tools.x86_64, but nothing changed.