Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

aws-cli portable for windows?

this is probably not a big issue for most people but do you know if there is anywhere a portable version for windows of aws-cli.

This because some people might want to install it for example in company laptops and not have admin rights to do it so I was wondering if I could find a portable version somewhere.


edit

could not find a proper portable software version for it but if you manage to install python and use pip then the installation following the instructions in github are quite easy.

final update

I was quite lucky because my company just introduced python as a tool that they allow us to install so I managed to use pip. the only thing I needed to consider was the user flag so it installs where I have permissions:

pip install --user awscli
pip install --target=YOUR_PATH awscli
like image 631
Miguel Costa Avatar asked Jan 09 '18 10:01

Miguel Costa


2 Answers

As of April 2021, there is only awscli version 1 available in pip repositories. If you want to use awscli version 2 but you don't want to use chocolatey or you don't have another windows machine available, you can:

  • download the .msi file from Amazon website: https://awscli.amazonaws.com/AWSCLIV2.msi
  • use msiexec in command line to extract application from msi package:
msiexec /a %USERPROFILE%\Downloads\AWSCLIV2.msi /qb TARGETDIR=%USERPROFILE%\awscli

Now you can use awscli version 2 using the following command:

>%USERPROFILE%\awscliv2\Amazon\AWSCLIV2\aws --version
aws-cli/2.1.39 Python/3.8.8 Windows/10 exe/AMD64 prompt/off

As this method is a workaround, an feature request has been raised to be able to install awscli without admin rights: https://github.com/aws/aws-cli/issues/4633

like image 60
Vincent Doba Avatar answered Sep 20 '22 10:09

Vincent Doba


This is how I've gotten around this issue in the past:

I downloaded (.msi) and install AWS CLI onto my personal laptop then I copy this entire directory (/Amazon/AWSCLI/..) to my corporate laptop where I don't have Admin rights. Then you can either temporarily update the PATH environment variable in your cmd/powershell session or you can permanently update your user variable's PATH to include the location of aws.exe.

It appears you will have to use the aws.exe under /bincompat (instead of /bin) as of their newest release. I haven't yet tested this version to see what limitation exists.

like image 26
Hyon Avatar answered Sep 21 '22 10:09

Hyon