Monday, March 30, 2009

HOWTO Install Amazon EC2 Command Line Tools

HOWTO Install Amazon EC2 Command Line Tools

1.- Download Amazon EC2 Command Line Tools

WEB: http://developer.amazonwebservices.com/

2.- Unzip and setting up the CL Tools
wmunguiam@server:~/EC2$ ls -l
total 7579
drwxrwxr-x 4 wmunguiam 200 2009-03-11 09:04 ec2-api-tools-1.3-34128
-rw-r--r-- 1 wmunguiam 7753462 2009-03-30 19:19 ec2-api-tools.zip
Set this environment variable
wmunguiam@server:~/EC2$ export EC2_HOME=/home/wmunguiam/EC2/ec2-api-tools-1.3-34128/
wmunguiam@server:~/EC2$ export PATH=$PATH:$EC2_HOME/bin
3.- Register X.509 Certificate (public/private key pair)

Download and unzip private key and certificate
wmunguiam@server:~/EC2$ ls -l
total 7603
-rw-r--r-- 1 wmunguiam 1289 2009-03-30 16:36 cloud-cert.pem
-rw-r--r-- 1 wmunguiam 1285 2009-03-30 16:36 euca2-wmunguiam-1522ffae-cert.pem
-rw-r--r-- 1 wmunguiam 1675 2009-03-30 16:36 euca2-wmunguiam-1522ffae-pk.pem
-rw-r--r-- 1 wmunguiam 4128 2009-03-30 19:34 euca2-wmunguiam-x509.zip
-rw-r--r-- 1 wmunguiam 747 2009-03-30 16:36 eucarc
Set Private Key into environment variable(EC2_PRIVATE_KEY)
wmunguiam@server:~/EC2$ export EC2_PRIVATE_KEY=/home/wmunguiam/EC2/euca2-wmunguiam-1522ffae-pk.pem
Set X509 certificate into enviroment variable (EC2_CERT)
wmunguiam@server:~/EC2$ export EC2_CERT=/home/wmunguiam/EC2/euca2-wmunguiam-1522ffae-cert.pem

4.- Secure files from public exposure

wmunguiam@server:~/EC2$ chmod 0700 ~/EC2
wmunguiam@server:~/EC2$ chmod 0600 ~/EC2/*

5.- Verify
wmunguiam@server:~/EC2$ echo $EC2_CERT
/home/wmunguiam/EC2/euca2-wmunguiam-1522ffae-cert.pem
wmunguiam@server:~/EC2$ echo $EC2_PRIVATE_KEY
/home/wmunguiam/EC2/euca2-wmunguiam-1522ffae-pk.pem


1 comment:

  1. Should there be another persuasive post you can share next time, I’ll be surely waiting for it.
    see this

    ReplyDelete