What is the true cost of Amazon's EC2 Free Tier? [closed]

I noticed that Amazon has a free EC2 tier. I am very interested in trying it but am afraid to host my own site there. My head starts to spin when I see all of the ways they charge users (charges for bandwidth, disk space, # of hours of operation). I just want to run a drupal site and have ssh. I get less than 5,000 hits/month, but am growing often. I have no serious problems with my current site but am trying to save a little bit of cash.

I see posts like this and wonder if I will be stuck paying $10 or so a month any way. Can anyone confirm that free is really free? What are "traps" that people fall into that ends up costing them money?


Solution 1:

If you are just running a Drupal website, you will need an EC2 instance with EBS storage and an Elastic IP address (all EC2 instances have SSH access). The EC2 instance (t1.micro) will be free (for 1 year, if you are a new customer)

You get 10GB of EBS storage - the default Amazon Linux AMI has an 8GB root volume. I would recommend shrinking this down to about 4 GB and attaching a second 6GB volume to your instance (at least personally, I like to keep my data separate from the root volume). One area where you might incur costs are for I/O. Amazon's Linux AMI is quite efficient, but depending on your drupal setup and traffic, it would not be unexpected to exceed the 1M I/Os you get per month.

Ideally, you will use EBS snapshots for your backups, however, that is very dependent on the amount of data you have. This is one of the reasons I like to split the root volume from my data. It is very easy to exceed 1GB of snapshot storage, and it can be quite difficult to estimate your necessary snapshot space (the first snapshot will be around 50% of your used space (depending on how compressible your data is). Each subsequent snapshot will take much less, since it is a differential backup, but looks at changed blocks as opposed to changed files. Alternatively, you can take more traditional backups (tar.gz) and upload them to S3 (remember though, that generating those backups result in I/Os).

Your final cost will come from bandwidth - 15GB per month is included in the free tier. Determine your current bandwidth usage to see whether or not you will go over.

At any time you can view your current account activity on Amazon's site, so you can monitor if you are getting close to the threshold values. Unfortunately, there is no way of setting caps on resource usage on AWS - whatever you use you have to pay for.

I would recommend setting up an EC2 instance, but keeping your existing host operational to begin with. You can switch your DNS to point to your AWS Elastic IP and try it out, keeping an eye on your Account Activity. If you find that everything is well within an acceptable range, you can do away with your existing host, otherwise, it is a simple matter of reverting your DNS and rsyncing any changes to go back to your old host (remember to delete your snapshots, EBS volumes, and stop your instances otherwise you will continue to incur costs). AWS also provides 'reports' with hourly activity broken down by resource usage - they are a bit hard to read, but you should be able to make sense of them. They can help you to determine when and what might be causing your usage to to be higher than normal.

Just to recap: you should be able to predict bandwidth usage in advance - which means that I/O will be the main factor that is hard to predict (and snapshot usage if you opt to go that root).

Solution 2:

We use EC2 free tier for a couple months, and so far it's really free, and we did nothing special to keep it free. Also you can check your account from time to time and see if you get close to limits, and you can always suspend or terminate your usage at any given moment to avoid unwanted charges.

Solution 3:

There is only one trap (that I know of)

There is no way to cap the bill, if you cross the free tier limit. Assume your site gets a DOS attack, you would cross the free tier limit easily and might end up paying a hefty bill just for the bandwidth.