Setting up Amazon EC2 and S3 – Cloud Computing
I’ve been figuring some new stuff out lately: Virtualization and Cloud Computing. On the virtualization front, I installed Hyper-V to understand bare metal hypervisors. I’ve used virtual machines before, but they’ve always been running on the OS, ala VMware Workstation and VirtualBox. Bare metal hypervisors are more interesting, cause the computer boots directly into the hyper visor, which then loads up the virtual machines. The advantage is obvious—the hypervisor itself uses barely any system resources, so the virtual machines get that much more overhead to play with. Of course, I loaded Hyper-V inside a virtual machine, just for kicks, so it was Win7->VirutalBox->HyperV->Win7. All very interesting. Next up is ESXi. That’s probably tomorrow or day after.
Cloud computing is the next big thing, they say. All that’s well and good, but how do you actually use the damn thing? Turns out that it’s pretty damn easy. Just sign up at http://aws.amazon.com/. It’s free and easy to register. The only vaguely interesting things about the registration process are the requirement for a credit card, and the phone verification. The credit card is needed since you can’t actually do anything without paying for it, though rates are very reasonable to start with (.085 cents an hour, roughly Rs. 4, according to XE.com). The phone verification is interesting. Amazon actually calls a number you specify, and asks for the PIN number that they display on screen. No illegal stuff here, one can see. Yes, Indian cell phones work just fine. The signup process is fast, but you do need to wait for a bit before you can start provisioning your little fluffy piece of the cloud. I had to wait about an hour before it let me in.
Once registered, I had to create a personal certificate and an X.509 certificate. You can use your own, or use Amazon’s web interface to make a new one. It’s fast and easy. You’ll need these to interact with the machines you make, whether over SSH or directly through the API.
The Amazon Web Services Management Console, or AWS Management Control, is where all the cool stuff happens. Here’s what it looks like
This is what it looks like for EC2, which stands for Elastic Cloud Compute (C-2, geddit??). Wikipedia says this about EC2:
“Amazon Elastic Compute Cloud (also known as “EC2″) allows customers to rent computers on which to run their own computer applications. EC2 allows scalable deployment of applications by providing a web services interface through which a customer can create virtual machines, i.e. server instances, on which the customer can load any software of their choice. A customer can create, launch, and terminate server instances as needed, paying by the hour for active servers, hence the term “elastic”.”
Think of it as buying a server, plugging it in, and working on it, all within 20 minutes, and you pay by the hour. And oh yes, if you need to suddenly increase servers, just provision more. They take about 15 minutes to come up, so even small business owners can prepare for seasonal spikes in demand with great ease, without buying expensive hardware that sits idle for the rest of the year.
Creating a machine is quite easy. Click the button that says launch instance. This leads to a pop up box that lets you choose your image. The image here refers to the image of the machine that will be loaded. Amazon has a bunch of generic images (RHEL, Ubuntu, CentOS, Windows Server 2003, etc), or you can create your own. In most cases, you can start with a basic install of CentOS or Server 2003, and then directly log into that and modify it to your own needs. After you choose the image, you have to create a key pair—a one-click process. Finally, you come to the last page, where you choose your machine. Basically, you decide the hardware specs of your virtual machine. As you’d expect, more power costs more.
Once you’ve figured out all this, click launch. It takes about two minutes to boot a basic CentOS machine for the first time. The minute it launches, you’re paying by the hour. Every uncompleted hour is counted as a full hour.
After this, you can assign an IP address and talk to your server just like a real server. I’ll go into more details later.

sweet.
Hey! Good one! Long time no reply!