Website

Goal

Exploration

There are a few existing solutions out there that make website hosting fairly easy. While options like Squarespace or Wordpress can make beautiful websites, they both tend to carry a certain look, and they're not necessarily designed for a complete ground-up build. There are pros and cons, but options like that felt like cheating.

I began to look into raw indexable storage to link externally. Backblaze B2 was an attractive option, but does not have navigable buckets (as of August 2018). I didn't look into Azure, GCP, or other options, although I may in the future.

Execution

Once I had narrowed down my hosting options, I picked S3. It wasn't going to be too expensive (and gave a free trial which was useful for experimenting), and has brand name recognition. I created two buckets (www.colton.space maps directly to colton.space), and set them up for hosting by editing the properties and bucket policy.

I didn't want to edit and push files directly to the S3 bucket because I was still learning awscli. I also wanted to take advantage of git tools like branches, merging, and overall version control. I've been working with Gitlab CI recently and though that'd be a good tool to push to AWS. Github is far more popular, but Gitlab has a few benefits for a person looking to keep costs down (both CI workers and private repos are available for free accounts as of writing). I plan to make my repo public later, but I wanted to get it to a solid place first.

The git repo and CI allowed me to separate out branches as I built up pages and links locally and then merge into master when ready. The CI only pushes to AWS on a push to master to keep testing from going live. I'm still working on change-aware pushes (and deletes) to AWS to minimize traffic and requests.

Last, I wanted to make sure my site was served over HTTPS/TLS, because privacy and traffic integrity is important to me. S3 offers a non-TLS endpoint, but fortunately Cloudflare can help. Yes, the traffic between Cloudflare and AWS is unencrypted, but that traffic is at the level is going to be travelling between some of the big internet infrastructure companies, and likely only at risk to state-level actors. I'm willing to accept "last-mile" TLS for now.

As an added benefit, Cloudflare will cache some data to reduce a bit of cost on the AWS side (although I don't expect it to be much anyway). The caching will also increase speed a little bit to end users.

In summary, requests will travel to Cloudflare, which will either serve from cache or request from AWS. Cloudflare gives the added benefit of TLS/HTTPS. The site backend is hosted on AWS's S3 with deploys automated by Gitlab's CI.

Update 2019-09-04

I have moved my site from AWS to GCP since the original post, but much of the implementation is the same. Check out the new work here.

Conclusions

I can't say I'm great at HTML, CSS, or javascript, but this project is certainly breaking down some of the unknowns and making it far less daunting. I'm very happy with my Gitlab/AWS/GCP/Cloudflare integration and I look forward to tuning it endlessly. Now I just need to find content to fill these pages...