I have server ec2 instance where I got error :
$ sh ami-backup.sh
----------------------------------
Thu Sep 24 10:37:47 UTC 2015
----------------------------------
Unable to locate credentials. You can configure credentials by running "aws configure".
Same script worked on my local machine so I coped ".s3cfg" to that server still it gives same error "Unable to locate credentials"
On my local machine :
ashish@ashishk:~$ aws ec2 describe-instances --filters Name=vpc-id,Values=vpc-xxx | awk '{ print $8 }' | sort -n | grep "i-"
i-127fb8df
i-1effb6d3
i-29efe0e4
i-29fd04e4
i-d5888618
On my server (ec2 instance) with same ".s3cfg" :
$ aws ec2 describe-instances --filters Name=vpc-id,Values=vpc-xxx | awk '{ print $8 }' | sort -n | grep "i-" > /tmp/instanceid.txt
Unable to locate credentials. You can configure credentials by running "aws configure".
Why my same ".s3cfg" file is not working on different machines ! Please let me know what is wrong here !
Aucun commentaire:
Enregistrer un commentaire