0

I have installed aws cli on my cygwin, created a IAM user, downloaded its access key information.

in the ~/.aws/credentials contain

[default]
aws_access_key_id = xxxxxxxxxxxxxxxxx
aws_secret_access_key = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

and ~/.aws/config contain

[default]
region = us-east-1
output = text

But I get authentication error:

$ aws ec2 describe-regions
A client error (AuthFailure) occurred when calling the DescribeRegions operation: AWS was not able to validate the provided access credentials

Any idea where I am going wrong?

Daniel
  • 5,839
  • 9
  • 46
  • 85

2 Answers2

0

Have a look at How to get AWS command line interface to work in cygwin - it claims that it looks in the AWS_CONFIG_FILE environment variable for credentials, not ~/.aws/

Alternatively there's a windows powershell version of the CLI if that suits: http://aws.amazon.com/powershell/

  • I couldn't figure out what was the problem. I copied the same `credential` and `config` files to my MacBook and worked smoothly. – Daniel Aug 23 '15 at 23:17
0

I would check see if the $PATH is exported in ~/.bashrc correctly, if not add your the below line if not already there.

export PATH="$PATH:$HOME/.aws"

To check this when you login with the user try to

#echo $aws_access_key_id
#echo $aws_secret_access_key 

on the shell to confirm they are showing up the credentials. If you cannot still get going try to add the credentials again with the command

#aws configure

Good luck, hope it helps.

guru
  • 2,661
  • 1
  • 10
  • 4