This whole thing started out as a way to translate my resume into a digital form, that could show off a few of the things I’ve picked up over time: that I know how to host websites, and that I’m comfortable enough navigating around AWS to host those websites statically (and cheaply!).
This website lives inside of an S3 bucket. It costs me next to nothing to run it. In fact, my greatest cost so far was purchasing my domain name at a whopping $12 per year.
If you aren’t familiar, AWS S3 is an object-based storage service. Rather than putting your files on a server that you rent, S3 is more akin to just renting some really cheap hard drive space in the cloud. The trade-off there is that you can’t run scripts off of it since it can only serve static files.
The website files are generated by Hugo, and originally were deployed via Serverless Framework Components, but the original approach to their deployment needed some tweaking for my needs. For one, the default origin chosen was the S3 bucket directly, rather than the S3 website address, which caused a bunch of headaches where CloudFront wouldn’t find the index.html files for each directory properly.
It also didn’t set up an SSL certificate, which makes sense if the nameserver for the domain isn’t in Route 53, but it would be a nice option. Since my nameservers are in Route 53, it was simple enough to go generate them in Certificate Manager and attach it to the CloudFront distribution, then change the default behavior to redirect HTTP to HTTPS.
Since I had to customize a few things, going forward I’ll most likely just
update the site with a little one liner, until I look into reconfiguring things:
hugo -d site && aws s3 sync site/ s3://<s3 BucketName>/