Personal Website Technical Update 2
Contents
This is an update on the technical stack of my website. I was able to get Hugo site hosted on S3 based website hosting. I then setup CloudFront based distribution with S3 bucket as Origin. I used CloudFront, not for performance reasons, but to enable HTTPS support. I created custom SSL certification using ACM and set up my custom domain to point to CloudFront distribution using Route53. I set up the whole process as CodeBuild script.
Below are some of the notes for each software stack to get this whole setup working.
Hugo
- Ensure that your baseUrl in your config.toml ends with /, if not URLs will not be correct.
- If you are using git for your code repository, ensure you have some files in empty directories as git does not store empty directories.
S3
- Ensure you have enabled website hosting for your S3 bucket.
CodeBuild
- Attached is the buildSpec.yml file for CodeBuild.
|
|
CloudFront
- Ensure that you are pointing to S3 website hosting endpoint.
- Make sure Origin setttings are point to the exact location in S3 bucket.
- Ensure that you update Hugo site’s baseUrl CloudFront distribution url.
Author Shyam Ramineni
LastMod 2019-03-20