Skip to content
Serverless status page served from AWS S3 generated by Checkup running in AWS Lambda
HCL JavaScript Python
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
checkup @ d33fcac
lambda
.gitignore
.gitmodules
README.md
bucket.tf
config.js
cron.tf
iam.tf
lambda.tf
layer.tf
outputs.tf
provider.tf
statuspage.tf
variables.tf

README.md

status

Serverless status page served from AWS S3 generated by sourcegraph/checkup running in AWS Lambda

Description

Checkup is a tool for generating a status page. It is able to store the generated status page directly to S3. By running checks from a scheduled Lambda function, we can have a serverless status page.

Setup

Before running terraform apply, some dependencies need to be manually prepared.

Checkup static files and configuration

Checkup's UI is comprised of the static files inside it's statuspage directory. This repository includes Checkup as a submodule, so it's enough to ensure you clone and initialise submodules:

git clone --recurse-submodules https://github.com/yi-jiayu/status.git

If you have already cloned the repository, you can initialise the submodules with:

git submodule update --init

Checkup binary

The Checkup binary needs to be built as well.

Since our executable will be run in Lambda, we will build it for Amazon Linux with GOOS=linux GOARCH=amd64. We will also use CGO_ENABLED=0 because we are not using SQLite or other cgo dependencies.

(cd checkup/cmd/checkup && CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build)
mkdir -p layer/bin
cp checkup/cmd/checkup/checkup layer/bin/

Variables

The following variables can be set:

  • bucket (required): Name of the S3 bucket to be created for storing checks.
  • aws_region (default: ap-southeast-1): AWS region to create infrastructure in.
  • checkup_interval (default: 5 minutes): Interval between checks, specified as a CloudWatch Rate Expression.

Create a file terraform.tfvars to specify these variables with the following format:

bucket = "bucket-name"
aws_region = "ap-southeast-1"
checkup_interval = "5 minutes"

Apply

Finally, run terraform init followed by terraform apply. The URL of your status page will be output after the apply completes.

You can’t perform that action at this time.