These are chat archives for aws/aws-cli

6th
Oct 2016
Pranshu Kumar
@pranshu1992
Oct 06 2016 21:32
Hi guys.
I am unable to configure my aws-cli
I did aws configure
It gives me an option to fill in the secret key and app key. I do so and in the end it says permission not granted
I even tried sudo aws configure. That works but when I run the app it says credentials not defined.
I am on a mac. Trying to use aws-cli. Any suggestions will be appreciated.
James Saryerwinnie
@jamesls
Oct 06 2016 22:06
Do you have an existing ~/.aws/credentials file?
If so, you could be getting permissions errors if that's owned by root instead of your user, though that seems unlikely
Pranshu Kumar
@pranshu1992
Oct 06 2016 22:26
Yes I do have an existing file. when i sudo into it. That has my credentials stored. The one without sudo says "~/.aws/credentials" [Permission Denied]
James Saryerwinnie
@jamesls
Oct 06 2016 22:27
Ah, so you can probably just change the owner to be your current owner.
There's not really a reason for root to own ~/.aws/credentials in your home directory
Does this work for you? sudo chown $(whoami) ~/.aws/credentials
You'll probably also need to do the same thing for ~/.aws/config as well
If that file exists
Pranshu Kumar
@pranshu1992
Oct 06 2016 22:32
Great that worked perfectly now. That thing was bugging me for a while now. Thanks a lot James for working over this with me. I appreciate it :)