Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I created an official ubuntu 64 bit instance 10.10 and I following the instructions given in but I execute this command ec2-describe-images -o self -o amazon I am getting file not found the executed this command export EC2_PRIVATE_KEY=/home/xxxxx/pk-xxxxxxxxxxxxxxxxxxxxxxxx.pem export EC2_CERT=/home/xxxx/cert-xxxxxxxxxxxxxx.pem export JAVA_HOME=/usr/lib/jvm/java-6-openjdk/

share|improve this question
That guide tells you to add those commands to your bash config. Are you using Bash as your default shell? – Paul Norman Mar 24 '11 at 15:57
please, provide exact outputs for each command you've tried to execute – rvs Jul 9 '11 at 19:20
up vote 3 down vote accepted

Does your error message not say which file is not found (even just blank quotes)?

For Bash and the AWS Tools, the common scenarios are:

  • -bash: ec2-describe-images: command not found
    • Implying that either the AWS Tools were not installed or your $PATH does not include them
  • Required option '-K, --private-key KEY' missing (-h for usage)
    • Meaning you haven't exported EC2_PRIVATE_KEY
  • Required option '-C, --cert CERT' missing (-h for usage)
    • Meaning you haven't exported EC2_CERT
  • File not found: '/path/to/cert-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.pem'
    • Meaning you exported an invalid path
  • File not found: ''
    • Likely meaning you either put a space after the equal sign on your export statement or otherwise omitted the path entirely.

Presuming you have none of the above errors, I might suggest:

  1. running ec2-describe-images --help (it will confirm that you have the program, and provide you an overview of the commands)
  2. running the command in verbose mode ec2-describe-images -v -o self -o amazon
  3. try to run the program by passing your keys directly to it: ec2-describe-images -K /path/to/pk/pk-xxxxxxxxxxxxxxxxxxxxxx.pem -C /path/to/cert/cert-xxxxxxxxxxxxxxxxxxxxxx.pem -o self -o amazon

If that fails, try to run the API tools on your own (local) machine - they don't need to run on the remote machine (and it is rare you will actually need them on the remote machine - there are much more efficient ways of getting that information if you need to script something)

For a simpler way to get essentially the same information, try ElasticFox.

share|improve this answer

Obvious response, but it's worth a shot: Are you putting in those 'xxxxx's, or are you replacing them with your actual filenames?

share|improve this answer
I am actually replacing them with the actual file name – Jeevan Dongre Mar 24 '11 at 15:36

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.