PHP
Article

From Zero to Cloud: Setting Up an EC2 Sandbox, Part 1

By John Degner

From Zero to Cloud: Setting Up an EC2 Sandbox

If you’re an enterprising web application developer, you’ve no doubt been interested in experimenting with Amazon’s cloud offerings in the past few years. Maybe you aim to “survive your success,” as is the subtext of Programming Amazon EC2 by Jurg van Vliet and Flavia Paganelli; a struggle I’m sure all of us hope to be confronted with one day. Regardless of your reason for investigating EC2, your time will be well spent.

This is the first in a three part series focused on setting up EC2 as a sandbox for developers. Part 1 is straightforward, but worth covering, as it walks you through all necessary steps in setting up an account with Amazon Web Services (AWS). Part 2 will teach you how to configure your development environment and will help you find a reliable Amazon Machine Image (AMI). Part 3 will show you how to install Apache, MySQL and PHP and then clone your own AMI.

Benefits of EC2

I had been curious about Amazon’s cloud offerings since they launched in 2006, but either the perceived difference in the ecosystem or the fear of incurring astronomical bills due to the pay-as-you-use payment structure kept me from getting my hands dirty. Now, after some experience with EC2, I can say that there may not be something for everybody in this cloud, but there’s definitely everything for somebody who’s a web application developer.

The most rewarding aspect of programming for EC2 has been that I actually get to architect and build multi-tiered systems. With classic hosting, I felt that I had to shelve what I had learned about proper architecture and run everything on one machine. The approach generally suffices for running a blog or a small business website, but the purist in me always felt like hurry up and wait. When do I get to separate out my static content and put it on an optimized content delivery network? What if my database grows to the point that I need to split it out? What if my new cool application hits the front page of Reddit and my window of success is slammed shut by HTTP 500 and 503 errors?

EC2 allows us to build web applications in the way we were taught in Computer Science courses, but what about the cost? EC2 does cost more than a shared or dedicated host if you plan on running one 100% utilized machine. Which is why this article is for you, savvy web application developer, because you have tools to build, not web pages. You want to build them right the first time. And if you’re paying for it, you want a sandbox that you don’t mind turning off when you’re not using it.

Signing Up

Without further ado, let’s break out our email account, telephone, and credit card and register for EC2! In your favorite web browser, go to http://aws.amazon.com and click on Sign in to the AWS Management Console at the top of the page. We will be taken here:

AWS Sign In screen

Upon entering our email address on the page, we will be taken here:

Contact Information screen

After we fill in our contact information, check the agree to terms and submit the page, we’ll be prompted for our credit card information. Amazon requires an active credit card because of the pay-as-you-use payment structure.

AWS Payment Information screen

Next, we’ll need to verify our phone number. This is a simple 1-minute process whereby an automated service calls the phone and provides a pin number that we then enter into the next phase of the account creation wizard.

AWS Identity Verification screen

Finally, the account creation is complete and Amazon sends us a confirmation email. Now we can sign into the AWS Management Console for the first time.

If your interest is piqued, stay tuned for Part 2 where we move beyond the sign up and get our hands dirty configuring the development environment and installing an AMI!

Image via Lightspring / Shutterstock

More:
  • Dan

    Great article!

  • http://mywebs.hubpages.com/ Anthony Goodley

    Thank you for this article covering Amazon EC2. For too long I been trying to learn to use several Amazon cloud services. I’m really looking forward to further installments in this series!

    I hope this is one of but many articles to come that cover various Amazon cloud services.

  • Jack

    Not everyone got a credit card, I am so sick of getting locked out of everything like I do not have a credit card, they do not have any debit cards in Argentina :(

Recommended

Learn Coding Online
Learn Web Development

Start learning web development and design for free with SitePoint Premium!

Get the latest in PHP, once a week, for free.