|
Setting up a machine to do development with Amazon Web Services is not difficult. What follows is a quick guide.
First, make sure you have signed up for an account. This is very simple. Just go to http://aws.amazon.com/ and click Sign Up Now. Follow the instructions. Be sure and generate an X.509 certificate while you are there. In the instructions that follow, please make the following substitutions: - ACCESS_KEY_ID
- Amazon will assign this to you when you set-up your account
- SECRET_ACCESS_KEY
- Amazon will assign this to you when you set-up your account
- PRIVATE_KEY
- When you created your X.509 certificate, you will download a private key file. The name of the file will be something like this: pk-XXXXXXXXXXXXXXXXXXXXXXX.pem
- PUBLIC_KEY
- When you created your X.509 certificate, you will also download a public key file. The name of the file will be something like this: cert-XXXXXXXXXXXXXXXXXXXXXXX.pem
Download the Amazon EC2 Command-Line tools from here. You will end up with a file called ec2-api-tools.zip. Unzip it and put the resulting folder in /opt. Create a symbolic link in /opt called ec2 that points to this folder. Update $HOME/.bashrc as follows: # Update the following as necessary to point to your correct java installation export JAVA_HOME='/usr/lib/jvm/java-6-sun' # Configuration variables needed for the AWS tools
# See http://docs.amazonwebservices.com/AWSEC2/2008-05-05/GettingStartedGuide/
export EC2_HOME='/opt/ec2'
export EC2_PRIVATE_KEY="$HOME/.ec2/PRIVATE_KEY"
export EC2_CERT="$HOME/.ec2/PUBLIC_KEY"
# Append the Amazon ec2 tools to the path
if [ -d $EC2_HOME ] ; then
export PATH="${PATH}:${EC2_HOME}/bin"
fi Put copies of the PUBLIC_KEY file and PRIVATE_KEY file in $HOME/.ec2. After doing all of this, you will want to create an SSH key-pair. Just do the following: $ mkdir -p ~/.ssh $ cd ~/.ssh $ ec2-add-keypair ec2-keypair > ec2-keypair.pem |