Static Hosting with Amazon S3 and Cloudfront
byjokese.comI’m using Hugo [0], and this is how I host my site.
I have a small bash script that will generate the static files, push to S3, and issue a CloudFront invalidation.
Also, my bill is ~0.60 USD/month.
I have done the exact same thing with a Makefile :)
https://blog.martinlee.org/posts/how-its-made-pt2-or-hugo-in...
Invalidations are inefficient, and theoretically more expensive. Better to use version prefixes.
Be sure to check out Stout as well, we use it to deploy our static apps and it works and does all the config for you: http://stout.is
I also use S3, add also a bucket named www.example.com that redirects to example.com bucket.