Amazon Lightsail

Hello world and welcome to fishbits.dev! In this inaugural post I am going to talk a little bit about this site and how it was built. When I bought the domain a few months ago for this side project, I wasn’t 100% sure how I was going to build the infrastructure or even what I was going to run to host the domain. I landed on using WordPress because of my familiarity with it in past projects. In the same light, my comfort zone is definitely AWS, so I needed to decide how I was going to host a site. Cost is always at the forefront of any project I work on, and if you dig into the AWS reference architecture it becomes very apparent that hosting a massive WordPress site can be quite costly.

AWS WordPress Reference Architecture
AWS WordPress Reference Architecture Diagram

At some point we can dig into all the details about this reference diagram, but the truth is I don’t really need any of those infrastructure components to start a site. You may ask, “why not just use a managed solution like wpengine?”. And the answer to that is, I’m a tinkerer and love to do things myself. So, knowing I was going to self manage and host this site, I needed a solution and it came down to two options:

  1. Setup a VPC, install WordPress on an EC2 instance, and manage multiple components manually.
  2. Use AWS Lightsail and the Bitnami WordPress Container (pre-packaged).

I opted for #2 and below is a diagram of how it all works together:

AWS Lightsail Example

This setup is very simple. Some things to note:

  1. It’s subject to a single AZ having issues.
  2. If the container has problems, there isn’t a second one to balance the load to.
  3. The VPC setup is a giant black box, AWS doesn’t give you visibility into how that works.
  4. To route to the wordpress site, you must have a public IP and there is some magic sauce around setting up the routing from an unsupported domain.

Overall, I’m very happy with this setup for a small WordPress site. Depending on how this goes, I may play around with some other configurations like option #1 above in EC2. Anyway, one bit at a time! In my next post, we’ll walk through creating this setup with terraform.

Next: Creating an AWS account

Leave a Reply

Your email address will not be published. Required fields are marked *