with automatic updates on changes in CodeCommit Git repository
A number of CloudFormation templates have been published that generate
AWS infrastructure to support a static website. I’ll toss another one
into the ring with a feature I haven’t seen yet.
In this stack, changes to the CodeCommit Git repository automatically
trigger an update to the content served by the static website. This
automatic update is performed using CodePipeline and AWS Lambda.
This stack also includes features like HTTPS (with a free
certificate), www redirect, email notification of Git updates,
complete DNS support, web site access logs, infinite scaling, zero
maintenance, and low cost.
One of the most exciting features is the launch-time ability to
specify an AWS Lambda function plugin (ZIP file) that defines a static
site generator to run on the Git repository site source before
deploying to the static website. A sample plugin is provided for the
popular Hugo static site generator.
Here is an architecture diagram outlining the various AWS services
used in this stack. The arrows indicate the major direction of data
flow. The heavy arrows indicate the flow of website content.