Is there a way to install a specific version of AWS CLI in Unix? Even with the AWS Documentation, I didn't find something configurable for this.
2 Answers
Broadly speaking, this is how you install the AWS CLI in a Unix/Linux environment:
pip install awscli
Since it uses Python's pip, standard version syntax applies. To install a specific version, I looked through the release notes to pick one out, then used the syntax seen in the linked stackoverflow question:
pip install awscli==1.5.0
Note that in a non-one-off case, I'd suggest giving an installable range rather than a specific version, if possible:
pip install "awscli>=1.5.0,<=1.6.0"
In this case I've pretended you need something that exists in the 1.5 range but was removed in 1.6. Also note the quotes are required, otherwise you will be redirecting output to a file named "=1.5.0".
-
Even after mentioning version 1.11.84 ,it still says awscli version is 1.2.9 – Jaswinder Nov 07 '17 at 03:45
-
Jaswinder, I strongly suspect your problem to have been caused by the presence of multiple `pip`s on your system. Using `virtualenv`, you can avoid such problems: http://docs.python-guide.org/en/latest/dev/virtualenvs/ – progfan Jan 31 '18 at 22:56
-
I don't think this holds for CLI v2, see the answer by Mitchell. – Oliver Jan 06 '22 at 05:58
For anyone not wanting to use pip the AWS CLI V2 URLs are formatted like so:
https://awscli.amazonaws.com/AWSCLIV2-2.X.Y.msi
https://awscli.amazonaws.com/AWSCLIV2-2.X.Y.pkg
https://awscli.amazonaws.com/awscli-exe-linux-x86_64-2.X.Y.zip
https://awscli.amazonaws.com/awscli-exe-linux-x86_64-2.X.Y.zip.sig
For example v2.0.0 on linux the links would be:
https://awscli.amazonaws.com/awscli-exe-linux-x86_64-2.0.0.zip
https://awscli.amazonaws.com/awscli-exe-linux-x86_64-2.0.0.zip.sig
For AWS CLI V1 the URLs for the bundled installer are formatted:
https://s3.amazonaws.com/aws-cli/awscli-bundle-1.X.Y.zip

- 187
- 3
- 11