With the migration of the website from Azure to AWS, a new infrastructure that is dramatically different is to be set up.
This exmaple is great for setting up a static website on AWS that supports HTTPS. The reason of having such a complicated system to host a static website is mostly due to the fact that S3 does not support HTTPS.
Other than that, there are still some extra things needed to be taken care of when integrating with Hexo.
- In the Lambda function, URL needs to be rewritten to append ‘index.html’ for all folder paths.
- When uploading files to S3, the System defined Metadata ‘Content-Type’ needs to be set to according to the file extension.
Overall, the experience of setting up a static website in the storage blob that supports HTTPS on both AWS and Azure are both non-trival. Whil I do like the resource group concept in Azure for managing multiple resources, AWS does provide more documentations and third party supports for various purposes.