brianhop.info is officially SSL/HTTPS enabled.
I followed this simple guide Setup aws s3 static website ssl
Simply put, I needed to add AWS Cloudfront to my AWS S3 static Website that is powered by hugo, and enable https.
First issue came up when you need to have your SSL cert for AWS Certificate Manager before you set up your CloudFront Distribution. That was simple enough.
And Bang, Brianhop.info is SSL enabled!
the next issue I ran into was with cloudfront, it needs fully qualify the url. Meaning you need have the default html object (IE. index.html) in the url for sub-directories. This is annoying as hugo is set up to support simple subdirectory pages.
Basically, the site was setup for navigation with links like https://brianhop.info/page/resume/
. Now with cloudfront, they needed to be https://brianhop.info/page/resume/index.html
; not a problem, but it was an extra step, looked a bit off and required code changes.
Well, a bit of digging (googling) and I found my solution.
How do you set a default root object for sub-directories of statically hosted websites
In a nutshell,
Instead of pointing it to your bucket by selecting it in the dropdown (www.example.com.s3.amazonaws.com), point it to the static domain of your bucket (eg. www.example.com.s3-website-us-west-2.amazonaws.com)
The last issue, well, more of an understanding of Cloudfront. You need to set the ‘time to live’ (TTL) header for each item/page/file in your site. By Default TTL is 24 hours, thus when you make a change and run a build of post/page that already exists; it may not get pulled to cloudfront for update to 24 hours. The header setting is set in the S3 bucket file properties. I put the main page to 0 meaning cloudfront does not cache at all. This may defeat the speed cloudfront can give you.
I feel like the site is coming a long a bit. One step at a time.