Powered by coANDco UK

Amazon EC2 Howtos

From How2s

Quick Reference for Amazon EC2

This is a quick reference on how to set up and run/stop instances on Amazon EC2 on Mac OS X:

export JAVA_HOME=/usr
export EC2_HOME=/path/to/your/ec2-api-tools-1.3-19403
export PATH=$PATH:$EC2_HOME/bin
export EC2_PRIVATE_KEY=~/.ec2/pk-....pem 
export EC2_CERT=~/.ec2/cert-....pem

Display available images:

ec2-describe-images -o self -o amazon | grep machine

Run an instance:

ec2-run-instances ami-... -k gsg-keypair

Describe instance:

ec2-describe-instances i-...

Open instance ports:

ec2-authorize default -p 22
ec2-authorize default -p 80

Accessing instances via http:


Showing Fingerprints:

ec2-get-console-output i-...

Logging in (make sure you're in the same folder as your keypair file id_rsa-gsg-keypair root):

 ssh -i id_rsa-gsg-keypair root@ec2-...compute-1.amazonaws.com

Stop instance:

ec2-terminate-instances i-...

Debian Etch image: ami-30f11459

Check out which instances are running:

go to the website
Please check out our sponsor, thanks to whom How2s.org is FREE: