Protect Yourself Against Surprise Cloud Hosting Fees

There are lots of great things about hosting a web site or service in the cloud, but price stability is not one of them.  There are numerous ways a small project can get hit with a bill that is many times more than you would expect for the month.  Here are just a few scenarios:

  • Your web site goes viral and suddenly you are getting thousands of downloads of your hosted content. Not a big deal if you have a static website, but if you have some large files that are being downloaded, you can burn through bandwidth rather quickly.  A 50MB file is only $.006 per download, but 50,000 downloads will cost you $300.
  • Some of your custom code goes wild and starts making excessive data transfers in/out of your availability zone.  Or to a lesser extent, just starts burning through I/O operations.
  • You accidentally start an AMI with extra charges above the usual per hour rate.  For example, right now a Large Windows instance is $0.46 an hour, but a Large Windows Instance with SQL Server is $1.06 per hour.  That’s an extra $432 a month you might not notice until you get your statement.  Other AMIs could potentially have a larger markup too.
  • Your site is compromised and very bad people start using it as an open FTP site.  Amazon has a huge pipe to the public Internet and you could end up paying download fees for 10,000 copies of a HD movie hosted on your server.  This would cost you thousands of dollars and it is the one I’m most worried about personally!

The thing that seems strange to me is that Amazon has yet to put in a publicly available kill switch or even an alert system for crazy cost spikes.  People have been asking for on the forums frequently since 2009.  On the plus side, I have found some info in a post on the BitNami Blog that Premium Support customers can use the Cloud Watch service to monitor charges, but it doesn’t look as simple as it should be, and it’s not available to the ‘little guys.’  Regular users can setup free Cloud Watch alarms based on certain metrics like Bandwidth or EBS reads, but not on the actual charges you are incurring. 

So, what to do?  You could give up on the cloud for small hosting projects and stick with a fixed cost VPS provider. Or, if your site works with the right technology you could use a cloud provider like Heroku that gives you a fixed cost and a soft bandwidth limit of 2TB.  Or for people who trust in their OCD, you could manually check your billing summary page every day. None of these are great solutions if you want want Amazon is offering.

There is one web service I’ve used personally called Cost Alarm.  It does exactly what I want, monitors your overall AWS bill and sends an email messages when your charges reach whatever level you specify.  I use my mobile carrier’s email to SMS gateway so I will get a text message should there be a problem. 

Cost Alarm is still in beta test so it is free for now.  When the service does go live, the proposed cost is about $5 a month for a each AWS account monitored, which I think is reasonable.  I have ran some test cases and found that it does exactly what is advertised.  I wish that Amazon never created  a situation where a site like Cost Alarm was necessary.  It is really a feature that should have been baked into AWS from the start.  Given the situation though, I hope that Cost Alarm does well and keeps offering this necessary service.