Getting Started With EC2

There is a lot of information out there about EC2, including comprehensive documentation from the AWS Team. If you need to know something in depth, go there for the best answers. This post is more about how to get started quickly with EC2 than anything else.

A Quick Introduction

According to the documentation, EC2

presents a true virtual computing environment, allowing you to use web service interfaces to requisition machines for use, load them with your custom application environment, manage your network’s access permissions, and run your image using as many or few systems as you desire.

This is a bit overtechnical for my tastes, but I am just a lowly customer. In simple terms, this means that you can

  • Create an image of what you would like a fully configured Linux box to look like.
  • Load this image to one or more machines quickly, easily, and on demand.
  • Pay a small per-minute charge for each machine that you use.

This sounds revolutionary, and to some extent it is. While other companies have tried it, the concept hasn’t really taken off. Part economics, part complexity, and it is a difficult nut to crack. Amazon’s real innovations are in pricing, licensing, and in leveraging an already existing infrastructure. Essentially, users of AWS will be paying for the infrastructure that Amazon.com is going to be using during peak usage (around Christmas, I would guess).

The system is very cool, but it does have some caveats, especially for organizational use:

  • While EC2 abstracts the hardware, it still leaves the difficulty of application and information logistics. As many have said, “Amateurs talk about strategy, dilettantes talk about tactics, and professionals talk about logistics.”
  • Data persistance is a genuine issue with EC2. An unexpected crash can be devastating if you are going to lose all your information without recourse.
  • Licensing becomes difficult under this scenario for a lot of enterprise software. Free software and open source makes this all possible.

With this in mind, let’s get rolling.

Super Quick Start

If you are really impatient and want to get rolling, all you have to do is:

  1. Follow my instructions for setting up AWS.
  2. If you are going to use S3 (and it is likely that you are), follow my instructions for using S3.
  3. Follow the EC2 instructions from overstimulate that show the basics of getting up and running with EC2.

Because someone already has pretty good instuctions on how to get started with EC2, I am not going to repeat them. Follow these steps and you will get a basic understanding of what is going on. You can be up and running with a generic Linux box that you can do your bidding with.

Some Customization

To Amazon’s credit, it is relatively easy to make an off-the-shelf Linux server from one of the ready made images. However, this isn’t what I am interested in. I am much more interested in the ability to make lots of identical machines that have my own customized specifications. While this isn’t quite as easy, it isn’t much harder providing you know what you are doing.

What I really want to do is have my own customized:

  • Users
  • Directories
  • Permissions
  • Software (Python 2.5 with SQLite, key-based access with SSH, access to S3 and SQS, etc.)

The Long Way Home 

It turns out that the amount of work that is required to get started with EC2 would make this post unbearably long.  So, if you are interested in more details, check out my later posting on establishing an EC2 presence.

Share and earn some karma ...These icons link to social bookmarking sites where readers can share and discover new web pages.
  • del.icio.us
  • digg
  • Furl
  • NewsVine
  • Reddit
  • Spurl
Digg this     Create a del.icio.us Bookmark     Add to Newsvine

4 Responses to “Getting Started With EC2”

  1. Architected Information » Starting with Amazon EC2 and S3 Says:

    […] Getting Started With EC2 — My step by step walkthrough for EC2. […]

  2. Michal Migurski Says:

    I’ve already started using EC2 as a cluster, and I’ve found that imaging new machines is very easy. It just requires an S3 account, and makes an exact replica of whatever machine you create the image from. One pitfall I noticed was that the ec2-bundle-vol `-s` flag (see http://docs.amazonwebservices.com/AmazonEC2/gsg/2006-06-26/creating-an-image.html) is very important - it defines the total HD size of the created image, so you will need to give yourself enough overhead to do what you need to do. Another is that the imaged machine is not a snapshot, takes some time to boot up, and needs to have services such as MySQL started on it. It would make me happy if AWS provided something like an SSH multicast, to run repetitive commands on a whole cluster at once.

    The inclusion of S3 and SImple Queue Service was the biggest advantage, especially since S3 data lives on past the termination of each machine instance. Thankfully, I noticed that AWS charges per queue message, and grouped my queue messages to avoid $150 worth of fees.

    I’ll probably put all of this into a post once I’m done with my first experimental usage.

  3. morgan Says:

    Michal,

    Thanks for the feedback. Let me know how it goes, I would be interested to hear what you are using your cluster for.

  4. Architected Information » Getting Started With AWS Says:

    […] Getting Started With EC2 — My high level introduction to using EC2. Share and earn some karma …These icons link to social bookmarking sites where readers can share and discover new web pages. […]

Leave a Reply