Getting Started
Amazon EC2The Amazon website provides the following description to explain its service:
“Amazon Elastic Compute Cloud (Amazon EC2) is a web service that provides resizable compute capacity in the cloud. It is designed to make web-scale computing easier for developers.Amazon EC2's simple web service interface allows you to obtain and configure capacity with minimal friction. It provides you with complete control of your computing resources and lets you run on Amazon's proven computing environment. Amazon EC2 reduces the time required to obtain and boot new server instances to minutes, allowing you to quickly scale capacity, both up and down, as your computing requirements change. Amazon EC2 changes the economics of computing by allowing you to pay only for capacity that you actually use. Amazon EC2 provides developers the tools to build failure resilient applications and isolate themselves from common failure scenarios.”
Before getting started with Amazon EC2, Amazon recommends that should be somewhat comfortable in a Linux environment, be somewhat familiar with Web Services, have an SSH client and Java 5 (or newer) installed. Following the instructions outlined below a link will be provided to Amazon’s documentation providing explicit step-by-step instructions.
In order to dig in you must first setup three Amazon accounts. One each at Amazon Web Services (AWS), Amazon Simple Storage Service (Amazon S3) and Amazon EC2. Once you have an AWS account creating the AS3 and AEC2 accounts are just a few clicks away.
Once the accounts are created you need to setup the command line tools. Amazon EC2 provides command line tools as well as an API for managing your cloud. The tools are bundled as a zip (download) which are almost ready to use once extracted, first a few environment variables will need to be configured (EC2_HOME, EC2_PRIVATE_KEY and EC2_CERT).
With the configuration and setup out of the way the next thing to do is launch an Amazon Machine Image (AMI). The command line utilities provide methods for creating your own images as well as listing those made public by Amazon. Once an image is selected you’ll need to generate and SSH keypair which allows you to login to the instance. If you use PuTTY you’ll need to convert the private key to PuTTY’s format, instructions can be found here.
Next you simply use the “ec2-run-instances” command-line tool to start the image selected previously. Momentarily it will be in a “running” state, which can be checked by using the “ec2-describe-instances” command. Before access is available the appropriate ports need to be authorized to be opened. To allow SSH and HTTP you’d use the “ec2-authorize” tool to allow access to port 22 and 80, respectively.
Now to verify things worked properly just access the site URL (given as output when the “ec2-run-instances” command was executed”, something like ec2-67-202-51-223.compute-1.amazonaws.com) using a web browser. With the basic setup and configuration out of the way you can begin deploying content and working with your new cloud.
For detailed instructions the Amazon EC2 Technical Documentation site provides plenty of information.
