Setting up to use EC2
This is a short list of the steps I took to get access to Amazon EC2. I basically followed the EC2 Getting Started Guide.
I already had an AWS account.
Subscribed to EC2: browsed to Amazon Web Services @ Amazon.com, clicked on “Sign Up For This Web Service”, completed forms.
Generated X.509 certificates: Your Web Services Account -> View Access Key Identifiers -> Your X.509 Certificate -> Create New.
Downloaded credentials: Downloaded the private key and certificate to ~/.ec2 (effectively – actually in my world this is a symlink to ~/Keys/aws/ec2/ ).
Figured out my EC2 user ID: Your Web Services Account -> Account Activity -> Account Number. Remove the hyphens to generate a 12 digit number. This is your EC2 userid. This step appears to be redundant. After setting up and tearing down an instance, I have yet to use this userid.
Downloaded the EC2 Command Line tools: from the Amazon EC2 Resource Center. Unzipped them and moved them to ~/Library/ec2-api-tools-1.3-24159 (seemed like a good place, this being Mac OS X).
Setup environment variables: Arranged for EC2_HOME environment variable to be set, and it’s bin dir to be added to my path, my JAVA_HOME to be set, and for the tools to know who I am (EC2_PRIVATE_KEY and EC2_CERT), in .bash_profile:
export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home export EC2_HOME=~/Library/ec2-api-tools-1.3-24159 export PATH=$PATH:~/bin:/opt/local/bin:$EC2_HOME/bin export EC2_CERT=~/Keys/aws/ec2/cert-XXXXXXXX.pem export EC2_PRIVATE_KEY=~/Keys/aws/ec2/pk-XXXXXXXX.pem
ec2-describe-images -o self -o amazon
