0

I have the limitation of using Windows 7 due to hardware limits. This is the only machine on which I do all assignments. I installed cygwin ad want to use awscli.

I went through articles here How to get AWS command line interface to work in cygwin from I read things here http://wiki.fast.ai/index.php/Awscli_in_cygwin an answer mentioned above I tried

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

when I do

$ aws --version
aws-cli/1.15.81 Python/2.7.14 CYGWIN_NT-6.1/2.10.0(0.325/5/3) botocore/1.10.80

Now when I do aws configure I get errors

DEEL@DEEL-PC ~/.aws
$ aws configure
AWS Access Key ID [****************NLVA]:
AWS Secret Access Key [****************2YhC]:
Default region name [None]: ap-south-1
Default output format [None]: text

[Errno 2] No such file or directory: ''

What is it complaining and how can I get rid of this? When I do

$ cat config
[default]
output = text
region = ap-south-1

I had previously tried to setup things and made these entries. Now when I run

$ aws ec2 describe-instances
You must specify a region. You can also configure your region by running "aws configure".

and when I run aws configure

DEEL@DEEL-PC ~/.aws
$ aws configure
AWS Access Key ID [****************NLVA]:
AWS Secret Access Key [****************2YhC]:
Default region name [None]: ap-south-1
Default output format [None]: text

[Errno 2] No such file or directory: ''

I also checked No such file or directory error when configuring aws on cygwin but could not fix the problem.

Now I did

$ rm -rfv .aws/
removed '.aws/credentials'
removed directory '.aws/'

and again

DEEL@DEEL-PC ~ $ aws configure 
AWS Access Key ID [None]: ****************VA 
AWS Secret Access Key [None]: *************hC 
Default region name [None]: ap-south-1 
Default output format [None]: text
[Errno 2] No such file or directory: ''

but again I get the same error. Now this is a problem what more should I check here for awscli to work in cygwin?

ss321c
  • 689
  • 2
  • 11
  • 23

1 Answers1

0

I am posting this answer for future reference

1)Installed python3-pip from cygwin setup which directly installed all dependencies from cygwin. (however the original problem did not solve by this alone I had to go to step 2)
2)Based on a suggestion here
Started cygwin as admin in windows 7 (this directly fixed things for me)
3) Removed the environment variable AWS_CONFIG_FILE which was defined based on a suggestion here

4) hash -d aws (to clear cache)

Things worked. I am able to use aws commands in cygwin now. Can launch the amazon ec2 instance and start it and stop it on command line. However any suggestion/answer to further understand as what could have gone wrong here are welcome.

ss321c
  • 689
  • 2
  • 11
  • 23