Hosting a Hugo Website on AWS Made Easy with Terraform: S3, CloudFront, Route53, and SSL Automation
In this post I will show you how to deploy a Hugo site to AWS using Terraform.
The idea is not only to store the Hugo site static files in an S3 bucket and serve it using CloudFront, but also to automate the process of creating any needed DNS records with Route53 and the corresponding certificates with AWS Certificate Manager.
The architecture of the site is shown below:
For simplicity, I will ignore terraform best practices, and create a single main.