Databases Reference
In-Depth Information
You may think these are a lot of values to generate and write down. To summarize,
here are the five values you should have at this point:
Your 20-character, alphanumeric Access Key ID
Your 40-character Secret Access Key
Your X.509 Certificate
file under the .ec2 directory
Your X.509 private key
file under the .ec2 directory
Your 12-digit (unhyphenated) AWS Account
ID
You'll use these values later to authenticate yourself to AWS and control your
Hadoop cluster.
9.2.2
Getting command line tools
After getting all the security credentials, you should download and configure the AWS
command line tools to instantiate and manage your EC2 instances. These tools are
written in Java, which presumably is already installed on your local machine.
The EC2
are self-contained in one downloadable ZIP file from
the AWS EC2 Resource Center. 1 Unzip the file into a directory you use for your AWS
work. In the unzipped files you'll see the Java tools plus shell scripts for Windows,
Linux, and Mac OS X.
You don't have to configure the command line tools, but you do have to set a
few environment variables before using them. The environment variable EC2_HOME
should be a path pointing to the directory where the command line tools were
unzipped. Unless you have renamed that directory, its name is ec2-api-tools-A.B-nnnn,
where A , B , and n are version/release numbers. You should also set EC2_CERT and
EC2_PRIVATE_KEY to point to your X.509 certificate and private key files, respectively.
I've found it useful to have a script for setting up all the necessary environment variables
to use the AWS command line tools. A version for Linux, Unix, and Mac OS X, called
ec2-init.sh , is in listing 9.1. You run this script before using any AWS related tools
by executing
command line tools
source ec2-init.sh
or
. ec2-init.sh
Listing 9.1 ec2-init.sh: a Unix script setting up variables for EC2 tools
export JAVA_HOME = /Library/Java/Home
export EC2_HOME = ~/Projects/Hadoop/aws/ec2-api-tools-1.3-30349
export PATH = $PATH:$EC2_HOME/bin:$HADOOP_HOME/src/contrib/ec2/bin
export EC2_PRIVATE_KEY = ~/.ec2/pk-HKZYKTAIG2ECMXYIBH3HXV4ZBZQ55CLO.pem
export EC2_CERT = ~/.ec2/cert-HKZYKTAIG2ECMXYIBH3HXV4ZBZQ55CLO.pem
1 http://developer.amazonwebservices.com/connect/entry.jspa?externalID=351&categoryID=88.
 
 
Search WWH ::




Custom Search