Activities

August 2010
M T W T F S S
« Jul   Sep »
 1
2345678
9101112131415
16171819202122
23242526272829
3031  

How to manage Amazone EC2 from the commandline on Windows

After login to the AWS portal, Go through the menu Accounts—> Security Credentials–>Access Credentials

Then choose the “X.509 certificates” tab from the opend page. During the initial AWS account setup, you may ask to create a X.509 certificate along with a private key. Amazon will suppose to be created only 2 X.509 certificate at a time.
Pls see the attached window,

if you have already downloaded certificate file and private file, copied it in to a safest place. We need both these files to get in to command line login. You can also create the second “X.509 certificate’ file by clicking the ” generate new certificate” link on the same window and you will get a prompt to download certificate file and private key file.

Now you need to download the cli-api tools from here http://s3.amazonaws.com/ec2-downloads/ec2-api-tools.zip. Download and copy it to “C:EC2” folder where I wish to work. Now you need to complete the following steps.

1. Copy the certificate file (cert-5SQGV63Y2CJU62V4RUXUDHUKOFRGUH.pem ) and the private key file (pk-5SQGV63Y2CJU62V4RUXUDHUKOFOSRGUH.pem) inside the “c:ec2″ folder
2. You also need to generate a key pair from AWS console and download it in to this ” cec2″ folder.
3. Install Java (jdk1.6.0_14)
4. Setting up path and environment variables.
You may need to set 4 environment variable showing as below.
a. JAVA_HOME =C:Program FilesJavajdk1.6.0_14
b. EC2_CERT = C:ec2certscert-filename.pem
c. EC2_HOME = C:ec2
d. EC2_PRIVATE_KEY= D:ec2certspk-filename.pem
e. You need to add the “C:ec2bin” in system path list.

Now everything are in place and now you need to test it out. Open command line window and type ” ec2-describe-regions” Out put should look like this,

All are set !!

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>