BRYAN TRAVIS HOOPER

February 5, 2023

Hosting a Static Site on AWS

Bryan Travis Hooper

Recently, I decided to move this blog, which is a very poorly maintained blog, I admit, to AWS. I wanted to do this more or less as a learning excersize and also because I figured AWS would be an inexpensive option.

I have been a happy customer of serices like Linode, Heroku and Digital Ocean for years. These companies provide a great solutino for web apps and web sites, and they have been improving and expanding their offerings lately. Generally speaking you can reserve a virtual instance with your flavor of linux and attach some storage and a database and get a basic project up and running. For projects like that - with a modern, but basic stack - these tools are perfect. I love how easy it is to fire up a Linode node and get to work.

But, for a simple static site, they seem like a bit of overkill. If you are just serving HTML, CSS and JS, Amazon Web Services seems like a better option. AWS has tons of different services, so if your project expands to include more needs, AWS allows you to take advantage of the vast resources AWS has to offer. Decide later you want to add DB functionality? What to add some basic API endpoints? What to run some maintenence workers? AWS has you covered. If you are sure you only want a static site, perhaps GitHub Pages is a better option since it is totally free. But AWS also allows you to integrate with your GitHub repo and update your static site with a simple push command.

But...and this is a big but...AWS doens't go out of it's way to make life easy. If anything, AWS is overwhelming with options. For any given problem there are multiple different paths to a solution. And AWS can be confusing becuase of it's sheer scale. There are loads of tutorials out there on setting up a static stie on AWS. And yet, AWS can still mess with your head.

Is it worth it?

I think so. I reduced my hosting costs from around $10/month to less than $1/month. The initial configuration and set up was a bit of work, but once things were all wired up, I could push up to my GitHub repo and AWS does the rest. It works. And it saves me a lot of money.

DHH and the 37 Signals team have been moving away from AWS, and DHH has recently talked about the reasons why. I think he makes some good points, and organizations in similar situations would do well to ponder the lessons they've learned. At the same time, no one should shy away from AWS. It remains an amazing service with a low cost to entry. The biggest barrier to AWS is the learning curve.