0

I am trying to execute a bash script to fetch the ec2 cost details from aws. while executing the script i get the following eror

Required option '-O, --aws-access-key KEY' missing (-h for usage)

I have exported the keys inside my script as well as using "aws configure"

export AWS_CONFIG_FIL="~/.aws/config"
export AWS_CREDENTIAL_PROFILES_FILE="~/.aws/credentials"
export AWS_ACCESS_KEY_ID=*******************
export AWS_SECRET_ACCESS_KEY=*******************************

but still i get the same error. Any help on this would be appreciated. Thanks

5
  • if you are using the .aws/credentials why you set the access key and secret too? Commented Aug 25, 2016 at 12:48
  • @cmnardi I am using either of them i meant to say i tried both possibilities but still not working. Commented Aug 25, 2016 at 13:28
  • echo $AWS_ACCESS_KEY_ID in the bash script before calling cost details just to make sure it is correctly set. Or use aws configure and set your credentials. Commented Aug 25, 2016 at 14:08
  • @helloV yes its set perfectly.. Commented Aug 25, 2016 at 14:29
  • Add set -x at the beginning of the script and find out which command is complaining Commented Aug 27, 2016 at 2:51

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.