I have been hosting my static Hugo generated website on Amazon S3 and serving it using Amazon CDN CloudFront. It works flawlessly except one aspect of CloudFront where it will cause a problem if you enable S3 Bucket Restriction on.
CloudFront only allows you to specify a default root object (index.html), but it only works on the root of the website such as www.nish.com -> www.nish.com/index.html. It does not work on any subdirectory such as www.nish.com/about/. If you were to attempt to request this URL through CloudFront, It would do an S3 GetObject API call against a key that does not exist.Read more