While browsing through Amazon’s EC2 documentation I suddenly wondered whether using their servers would make sense from a financial perspective, so I figured I’d actually do the math on a couple of their offerings. Amazon’s basic offerings are:

  • Small Instance (Default) 1.7 GB of memory, 1 EC2 Compute Unit (1 virtual core with 1 EC2 Compute Unit), 160 GB of instance storage, 32-bit platform
  • Large Instance 7.5 GB of memory, 4 EC2 Compute Units (2 virtual cores with 2 EC2 Compute Units each), 850 GB of instance storage, 64-bit platform
  • Extra Large Instance 15 GB of memory, 8 EC2 Compute Units (4 virtual cores with 2 EC2 Compute Units each), 1690 GB of instance storage, 64-bit platform

I wanted to compare these to actually buying a server yourself; so here are some comparable systems from Dell. For the larger machines I have chosen dual power supplies, RAID cards with hot-swappable disks, and a 24x7x4 “mission critical” support package. For the small one, I’ve used more basic components and next businessday support, since these are typically used for less mission-critical tasks. Click on the description to see the exact specs and pricing:

  • Small Instance: R300, 2 GB of memory, Celeron 1.86 GHz, 160 GB of storage using a 7200 rpm SATA disk.  
  • Large Instance: PE2970, 8 GB of memory, 2 cores with 2 GHz each, 800 GB of RAID-5 protected storage using 10000 rpm SAS disks. 
  • Extra Large Instance: PE2970, 16 GB of memory, 4 cores with 2 GHz each, 1500 GB of RAID-5 protected storage using 15000 rpm SAS disks. 

Now let’s have a look at the pricing. I’m working with a lifespan of three years; in my experience that’s a safe minimum value. Amazon charges the following:

  • Small: $0.10 per hour ($2628 for three years)
  • Large: $0.40 per hour ($10512 per three years)
  • Extra Large: $0.80 per hour ($21024 per three years)

Comparing these to buying your own systems, a small server would cost $725, and the larger servers $5045 and $7257 respectively. See the links above for the complete details about the hardware and pricing. You will need to host these servers somewhere, so you’ll have the following budget for hosting the servers:

  • Small instance: $53/month 
  • Large instance: $152/month
  • Extra large instance: $382/month

So especially for larger servers, buying and hosting your own servers makes much more sense, except for cases where you only need some additional capacity for a limited period. Even when using reliable hardware with the most expensive support contract, your own server will be cheaper. The advantage is even larger when you factor in that you’ll also need to pay extra for either S3 or EBS storage if you want to keep your files when your EC2 instance goes down. 

That doesn’t mean that EC2 is a completely useless service; bringing an extra EC2 machine online is a lot faster than ordering a new physical server, and it’s relatively easy to make copies of your machine images. And you’re billed by the hour, so if you only need a server for a couple of months it might be a good choice.