Rob Sears bio photo

Rob Sears

       

Rocket scientist. Computer hacker. Geek before it was cool.

BTC Donations:
1AU9qGkSubhR24r8Y4WEoV8bccZjeT2dKg

The premise

My friend wanted an online resume page, also known as a vCard in some circles (I’m still too sophomoric to use that term seriously). Basically, it needs to be professional, which entails demonstrating competency at all levels (how many times has an otherwise ideal candidate missed a job opportunity because of a single typo on their resume?).

These days, what constitutes a professional website has, at a minimum:

  • Custom domain (no more geocities/~mycompany123)
  • TLS/SSL (because who doesn’t use encryption?)
  • Responsive CSS (to support mobile and tablet devices)
  • Fast loading (no one wants to wait an extra 0.1s)

The constraint was cost and time: she had little money for lack of a job, and I had too little time for abundance of work.

The approach

A custom domain is actually really easy and pretty cheap (unless you’re trying to get something in high demand). Some hosts will give you a free domain when you sign up for a year of hosting with them.

Responsive designs are also trivially easy. There are so many frameworks capable of gracefully adapting to a variety of screens and devices. It’s so prevalent these days that every junior designer builds responsive sites as a matter of training. I’m not a designer really, but you can get a license for a great responsive design for a couple bucks.

The next issue is speed. For that, you can’t beat a static site. Whether you’re using Jekyll or simply deploying HTML files to a server, the lack of DB calls and OTF rendering engines mean minimal load times for end users. In fact, if you’re minifying your code and serving from a cache or CDN, it’s even faster.

This leaves us with a host selection. We don’t need databases or even a Windows/Linux environment for this. Sure, you can find a host that gives you a free domain with $5/mo hosting. But you’re still paying $60/year for resources you don’t need. It’s also going to be a little less secure.

Turns out you can host static HTML files in an AWS S3 bucket! The great thing about it is that AWS gives you the absolute minimum necessary to host the site, and charges mere pennies for usage.

Finally, TLS/SSL is more complicated, but doable. There is a cost with going with a big box CA. LetsEncrypt is a nice, free alternative. But their certs have a short lifespan, and I don’t want to be screwing around with deploying fresh certs every couple months. I ideally want to “one and done” this project. Fortunately CloudFlare offers SSL for free (sort of, more on that in a sec), in addition to minification and caching to speed up HTML sites.

The solution

Here’s what I did:

  1. Get a domain from Google Domains for $12/year. True, it’s not the cheapest option, but it’s the most reliable in my opinion. Google lets you do a lot of things with the domain, including fine grained control of DNS records, which we’ll need later.

  2. Find a template. I hopped over to Envato Market and picked out a few responsive HTML vCard templates that I thought would look good while not being overly complicated. I sent the links along to my friend, and she picked out her favorite. It was $8. I took an hour or so and tweaked it with her pictures and information. Total cost so far: $20.

  3. Get an AWS account and set up a S3 bucket. A couple of things:
    • Your bucket has to share the name of your domain. If your domain is http://www.abc-company.com, name your bucket abc-company.com
    • Make sure to check the box marked “Enable website hosting” and provide a root document. The default is index.html, which should be fine.
    • Upload all of the files to S3
    • Set all of the files to “public”
  4. Get a CloudFlare account and set up a domain for your new site. CloudFlare will pull all of the DNS records in for you. All you need to do is update Google domains with the nameservers that CloudFlare provides, then set up a CNAME record forwarding your domain to your S3 bucket. The final step is setting up SSL. This is a little misleading, because it only encrypts traffic between CloudFlare and the end user, not CloudFlare and S3. But this is a vCard site, not some NSA dropsite. It’s enough.

  5. Crack a beer and wait. It will take some time for DNS entries to propagate and for the SSL cert to be generated within CloudFlare. While you’re waiting, you should enable minification and caching in CloudFlare.

And that’s it! Given the relatively low request volume expected for the site (low request volume being less than 20K visits/month), the S3 cost should actually be free or a few cents at most. The domain is $12/year, or $1/mo and the template had a one time fee of $8. So operational costs are now basically… $1 per month, and we hit every objective for the site.