Maintenance Page
A GitHub Actions/Terraform deployable maintenance page with gov.uk branding and a configurable message.
#
The PremiseWe will deploy a stand alone static webpage into AWS S3 and served via CloudFront with HTTPS.
The Maintenance Page is enabled by updating the A record for the domain in Route53.
You can create this as a standalone GitHub project for your service (e.g 'myservice maintenace page') or drop it into an existing project in a sub directory.
#
Configure a certificateYou will need to manually create a certificate and reference the arn created from the terraform.
You can use AWS to request a certificate for your domain. e.g www.myservice.com. If your service is already running on AWS you might already have this available to use.
Make a note of the ARN that is assigned to your certificate as you will need to add this to your Terraform code - of course you could extend the code to make it configurable or even use Terraform to provision a certificate.
#
Build and RunInstructions on how to setup and deploy can be found in this README.
A fully working project can be found here.
#
Deploying from GitHubMake the deployment easier by adding a GitHub Workflow which builds and deploys the site while setting a message for your users.