Dynamic Website: Economical Hosting Options on AWS

If you need the features and versatility of dynamic website hosting, don’t despair: it needn’t cost a fortune.

In part one of my website hosting series, I showed you how to use AWS’s S3 to set up and host a very simple and cheap static website. Now I’ll focus on the more complicated question of dynamic website hosting. This will definitely cost us a little more, but we will still work to keep our costs to a minimum. Since WordPress seems to be the most popular package for building dynamic websites, we’ll use that for our deployment example.

Want a dynamic website on AWS? Get yourself a reserved instance.

If you intend to use your dynamic website over the long term, the cheapest option (assuming that Amazon’s free tier is not available or appropriate) is an EC2 reserved instance. This will, as a little research will demonstrate, reduce your costs significantly.

Assuming we’re not anticipating any heavy compute loads, we’ll go with t1.micro as our instance type. Signing up for a reserved instance means paying up front for a three-year instance, but it also means getting it at a rate of only $0.008/hr (according to current prices).

36 months
All Upfront

This amounts to $6.03 / month. Which is a pretty reasonable price for a fully hosted WordPress site.

Launch your dynamic website

Important: If you have bought yourself a reserved instance, you need to make sure that when you launch your website you pick the same instance type and same availability zone as your reserved instance.

There are many possible ways to deploy a WordPress website into AWS, but in this particular example, I am going to use CloudFormation which I think is one of the easier options available. To launch using the AWS console, follow these steps:

  1. Click on CloudFormation.
  2. Create New Stack.
  3. Give your stack a name.
  4. Click “Select a sample Template,” choose “WordPress Blog” and click next.
  5. Fill in all the necessary information, remembering to choose the same instance type as your reserved instance, if you bought one, and click next.
  6. Add Name as Key and whatever name you want as value, and click next.
  7. You should now be at your review screen so check your parameters and options, then click create.

You should now see a status of “CREATE IN PROGRESS” so sit back and wait 5-10 minutes for it to complete.

Once you see “CREATE COMPLETE” you are all done. You can now go to the EC2 Instances dashboard to check for your running instances. You should see your brand new WordPress installation along with its new public DNS address. Point your browser to the address and complete your WordPress installation.

So a simple AWS deployment – whether a static or dynamic website – doesn’t necessarily require all that many resources or a painful price tag. Going the static route with S3 can, for all intents and purposes, cost you nothing. And a dynamic website running WordPress on a reserved instance using CloudFormation, will only cost you about $6 /month.

Of course, throwing in other features like your own domain name or a static IP will obviously raise the price a little bit more, but I believe I’ve demonstrated that AWS can provide a solution to fit at least some use cases. As always, it pays to shop around through the various hosting categories and providers to make sure that you’re getting the deal that’s best for your particular needs. but you should certainly not ignore AWS.

Cloud Academy