Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

check_cli_version intermittently fails #24

Open
dlydiard opened this issue Aug 7, 2015 · 5 comments
Open

check_cli_version intermittently fails #24

dlydiard opened this issue Aug 7, 2015 · 5 comments
Labels

Comments

@dlydiard
Copy link

dlydiard commented Aug 7, 2015

i intermittently get the following error with codedeploy which is under an ASG/ELB
More often than not it fails. I made the script skip the checks for now, but would like it to work, so i'm aware of cli requirements.

[stderr]Checking minimum required CLI version (1.3.25) against installed version (1.2.9)
[stderr][FATAL] CLI must be at least version .. to work with AutoScaling Standby

actual verison is 1.7.43:
aws --version
aws-cli/1.7.43 Python/2.7.6 Linux/3.13.0-61-generic

@Jmcfar
Copy link
Contributor

Jmcfar commented Sep 28, 2015

Hi,

Sorry about the delay on responding - Are you using one of the publicly available AMIs? If so, can you provide the id?

Did you manually install the aws CLI in addition to the one pre-installed on the AMI? If so, I'm wondering if the scripts are picking up the older pre-installed version while you're local shell is using the newer one. Which installation path were you using when you received the 1.7.43 version response above?

@MarkGalloway
Copy link

Failing for me with the exact same error using the Ubuntu AMI

ubuntu@ip-10-0-2-203:~$ aws --version
aws-cli/1.10.1 Python/2.7.6 Linux/3.13.0-76-generic botocore/1.3.23

@wjordan
Copy link

wjordan commented May 13, 2016

It's possible to have two versions of awscli installed in Ubuntu:

  • 1.2.9 in /usr/bin/aws via apt: apt-get install awscli;
  • 1.10.28 in /usr/local/bin/aws via pip: apt-get install python-pip && pip install awscli).
$ sudo apt-get update && sudo apt-get install -y awscli
[...]
$ aws --version
aws-cli/1.2.9 Python/3.4.3 Linux/3.13.0-74-generic
$ sudo apt-get install -y python-pip && sudo pip install awscli
[...]
$ /usr/bin/aws --version
aws-cli/1.2.9 Python/3.4.3 Linux/3.13.0-74-generic
$ /usr/local/bin/aws --version
aws-cli/1.10.28 Python/2.7.6 Linux/3.13.0-74-generic botocore/1.4.19

Depending on the value and order of entries in your PATH variable, either version may be executed by aws:

$ PATH=/usr/bin:$PATH aws --version
aws-cli/1.2.9 Python/3.4.3 Linux/3.13.0-74-generic
$ PATH=/usr/local/bin:$PATH aws --version
aws-cli/1.10.28 Python/2.7.6 Linux/3.13.0-74-generic botocore/1.4.19

So the fix is to either uninstall the old apt version of aws-cli (apt-get remove awscli), or make sure your PATH ordering is correct in your deploy script (export PATH=/usr/local/bin:$PATH).

@Jmcfar Jmcfar added the bug label Jul 5, 2016
@malaqueueit
Copy link

I had the same issue on Ubuntu. This did it for me:

apt-get remove awscli -y
apt-get install python-pip -y
pip install awscli

@rjshk013
Copy link

rjshk013 commented Dec 3, 2020

Thank you malaqueueit ,I have done the same ,But the difference is that previously I have only one was cli but that version is 2.1.6.Now I installed was cli using pip & got version as aws-cli/1.18.188 .After that the script elbderegister succeeded & the deployment was success

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants