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'm trying to set up the EC2 API tools and I'm stuck because I cannot figure out where I can obtain the file pointed to by the EC2_PRIVATE_KEY environment variable (I believe I have the EC2_CERT).

Of the multitude of different access credentials visible in the EC2 user interface, which one do I need to make the command line tools work?

share|improve this question
up vote 23 down vote accepted

Ok, turns out that I need to generate a new X.509 certificate, and then I'll be able to download both the EC2_PRIVATE_KEY and the EC2_CERT files.

This link proved useful:

share|improve this answer
Hey - thanks so much for answering your own question! It's really helpful for others when we arrive here from Google. :) PW – Phil Whittington Jun 20 '11 at 21:13
I can't find where "AWS Access Identifiers page" is! – Stewie May 29 '12 at 17:49
Same problem and solution:… – realjin Mar 4 '15 at 3:24

The private key is only downloadable at the moment you create the certificate.

share|improve this answer
Very helpful. I can only have two access keys so I deleted one, created another and then downloaded the credentials as a CSV. Worked great! Thanks! – Tim Stewart Jan 25 '13 at 19:50
How do I download the private key from Amazon AWS? – c.jespersen Jan 28 '14 at 16:53

Your Answer


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