I installed the AWS command line interface on my Windows 7 box, and it worked immediately when I called commands from a DOS shell.
But DOS, the worst language ever i
I had the same problem. I got around it by installing a new copy of AWSCLI within Cygwin. You first need to install the "curl" and "python" Cygwin packages, then you can install AWSCLI as follows:
$ curl -O https://bootstrap.pypa.io/get-pip.py
$ python get-pip.py
$ pip install awscli
If you're running bash, and you've previously executed the Windows AWS command line, you need to clear the cached path as follows:
$ hash -d aws
"aws --version" will then look similar to this:
aws-cli/1.8.1 Python/2.7.10 CYGWIN_NT-10.0/2.2.1(0.289/5/3)
as opposed to the Windows command line output, which looks similar to this:
aws-cli/1.8.1 Python/2.7.9 Windows/8
I'm now able to do "aws configure" under Cygwin, and everything works as it should.
In my case, I had to:
# Run Cygwin64 Terminal by right-clicking on the icon and selecting "Run as Administrator"
pip3.7 install awscli
aws configure
Once my AWS credentials had been configured I could run awscli commands on Cygwin where the latter had been launched normally, i.e. as a non-Administrator user.
Earlier I attempted the same steps but I launched Cygwin as non-Adminstrator and the awscli installation through pip didn't take. I didn't save the error messages, unfortunately.
After a LOT of time spent on this, I found a solution that works.
The primary issue is that the cygwin didn't come with python installed, and doesn't know where to find the existing Windows Anaconda version on your machine. This can be verified by running which python from within cygwin - it couldn't find where python is saved. Note that this can be confusing because running pip install awscli likely doesn't throw an error message. Cygwin actually installs awscli in the Window's Anaconda installation of Python (I find this odd since we didn't run conda install awscli).
HOWEVER, rather than try to point cygwin to the already installed version of Anaconda python on your machine it will save you a ton of headache to just install a cygwin-specific instance of python. The steps to do so are documented here: http://wiki.fast.ai/index.php/Awscli_in_cygwin)
pip uninstall awscli
wget rawgit.com/transcode-open/apt-cyg/master/apt-cyg
install apt-cyg /bin
apt-cyg install python
wget https://bootstrap.pypa.io/get-pip.py
python get-pip.py
pip install awscli
...Note, however, that the first command pip uninstall awscli
"hung up" for me. So just escape out of it using quit()
and continue with the others in order.
You can check that everything worked if you run which python
in cygwin and it points to the cygin version (i.e. /usr/bin/python , as opposed to: /users/.../Anaconda2/).
Additionally, if you happen to be asking this in conjunction with watching the setup video for the fast.ai course (http://course.fast.ai/lessons/aws.html), then the next step is CRITICAL for Windows users: when you download all the shell scripts from Github setup folder (https://github.com/fastai/courses/tree/master/setup), Windows automatically adds CRLF line terminators! Therefore, in cygwin, run the following commands to remove these line endings:
apt-cyg install dos2unix
dos2unix setup_p2.sh
dos2unix setup_instance.sh
bash setup_p2.sh
This should do the trick.
I used aws configure from DOS cmd window to create the cfg files (config and credentials) and tested them with a sample aws cmd (in DOS window). Then I copied Users\.aws folder to spot where cygwin thinks the user home folders are (in my case c:\cygwin64\home\). I then used TextPad to convert the line endings (use file>save-as; select unix line endings; make sure the files don't get renamed x.txt). Now it works.