how to install AWS CLI

A) Downloading SDK APIs

1. Create a folder to store your APIs in your local drive. E.g. C:AWS

2. Download the Amazon AWS SDK API tools for Windows (.zip) file from the following link.  and save in the folder created in step#1.

3. Unzip the file and Extract it to local drive

B) Install and setup Java

1. If JDK / JRE is not installed and environment variables are not set please follow below steps else jump to section ‘C’

2. Install and download JDK 5 or above. The JDK download is free and JDK 7 is available for download at

3. Set environment variable as following




4. Run command java –version and check if it displays the correct version of your JDK / JRE.

5. If you setup above commands though command window it will be valid for the session of this command window only.

6. Please set all above parameters through Environment Variables. You can access Environment variables through For windows 7 / Vista: MyComputer -> Right Click and Select Properties. -> select “Advanced System Settings” from left menu and go to Environment variables.

For Windows XP Right Click on Computer -> Select Properties -> Select Advanced Tab and click -> Environment variables.

7. Set the variables as shown below

C) Download and set AWS Certificate File and Private Keys. (Some of the data is masked or removed in the screen for confidentiality purpose).

1. Go to AWS Account section.

2. In the left menu click on “Security Credentials” as selected below :

3. Go to Access Credentials – > X.509

4. It will show all existing active / Inactive certificates.

5. Create a new Certificate by clicking “Create a new Certificate”. It will show screen as below :

6. Download your private key file and X.509 to local folder. (e.g. C:AWSkeys).

7. If you fail to save Private key file, AWS does not store it for you and you will lose it permanently.

8. if the case #7 happens, delete the new created certificate and follow steps #1 – #6 to save the file again.

9. Store the downloaded pk & cert file into local directory (e.g c:AWSkeys)

10. Set the AWS Keys in environment as below : (For going to Environment variable follow step#6 of section ‘B’)

i. EC2_HOME= < <path where you have downloaded ec2 tools extracted as section ‘A’>, e.g. C:AWSec2-api-tools-

ii. EC2_CERT=<fully qualified path where cert-xxxxx.pem file placed>

e.g. EC2_CERT= c:AWSkeys cert-F42xxxxxxxxxAR2xxxxxxUBA438xxxxD.pem

iii. EC2_PRIVATE_KEY=<fully qualified path where pk-xxxx.pem file placed>

e.g. EC2_PRIVATE_KEY= c:Cloudkeys pk- F42xxxxxxxxxAR2xxxxxxUBA438xxxxD.pem

iv. PATH=; <JAVA_HOME>bin;< EC2_HOME >bin (e.g. PATH=;C:SunSDKjdkbin;C:AWSec2-api-tools-

v. CLASSPATH= ; <JAVA_HOME>lib; < EC2_HOME >lib (e.g. CLASSPATH= ;C:SunSDKjdklib; C:AWSec2-api-tools-

11. Test your setup by executing following command in command line. ec2-run-instances or

ec2-describe-images –o amazon (Lists all public AMIs of Amazon)

If it shows above output your setup of AWS API is complete.

Keywords: Amazon AWS Cloud, EC2, CLI, API, Command Line Tools, AWS Console,  AWS SDK API

Leave a comment

Leave your opinion

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: