CloudFront-backed static frontend for chrispsheehan.com, scaffolded from the aws-terragrunt-starter
golden path.
This repo contains the site frontend, its small supporting Lambda set, and the AWS infrastructure used to build and deploy both.
If you just need to get oriented:
- Read the repo layout below.
- Run
just --listto see the available local workflows. - Use
just startfor local frontend work. - Use
just tg dev aws/frontend planwhen you need to inspect the dev stack.
| Path | Purpose |
|---|---|
frontend/ |
Astro static site with React components. Build output goes to frontend/dist. |
lambdas/ |
Lambda source, packaging contract, and runtime notes for log_processor. |
infra/ |
Terragrunt live stacks and Terraform modules for frontend, data, security, published OIDC role wiring, and artifact storage. |
The commands most people reach for first are:
just --list
just start
just unit-test
just log-processor-run
just frontend-deploy-live dev
just tg dev aws/frontend plan
just tg-all dev plan
AWS_REGION=eu-west-2 LAMBDA_NAME=prod-chrispsheehan-com-log-processor just --justfile scripts/deploy/justfile lambda-invokeThe AWS account must already contain:
- the GitHub OIDC provider for
https://token.actions.githubusercontent.com - the public Route53 hosted zone
chrispsheehan.com - an S3 backend bucket named from
infra/root.hcl:<AWS_ACCOUNT_ID>-<AWS_REGION>-chrispsheehan-com-tfstate
Bootstrap GitHub Actions roles once from a local shell with AWS credentials that can manage IAM:
export AWS_PROFILE=default
export AWS_REGION=eu-west-2
just tg ci aws/oidc apply
just tg dev aws/oidc apply
just tg prod aws/oidc applySet these GitHub repository variables under
Settings -> Secrets and variables -> Actions -> Variables:
AWS_ACCOUNT_ID=<your AWS account id>
AWS_REGION=eu-west-2
PROJECT_NAME=chrispsheehan.com
Workflows assume roles named:
<PROJECT_NAME>-<ENVIRONMENT>-github-oidc-role
Development deploys target dev.chrispsheehan.com and build from the current
commit.
Infra Bootstrapis the first-time environment bring-up path fordevandprod. It appliesaws/code_bucketfirst so the shared bootstrap Lambda zip exists before the Lambda stacks are created.Infra Planwrites saved Terragrunt plans for the selected environment.Infra Apply From Planreuses a prior plan run and applies only modules whose saved plan JSON reported changes.Dev Code Deploybuildsfrontend.zipandlog_processor.zip, uploads them to the dev code bucket, syncs the frontend artifact to the S3 origin bucket, refreshes CloudFront in a separate CI job, rolls the Lambda through CodeDeploy, and invokes it once in a separate CI job.
Production deploys target chrispsheehan.com.
- A new GitHub release publishes versioned frontend and
log_processorartifacts but does not deploy them to production. - Manually dispatch
Prod Code Deploywith a release tag after any required infrastructure rollout. Production validates those artifacts and then rolls them out; the same workflow supports redeployments and rollbacks.
- CI and workflow notes: .github/docs/README.md
- Infrastructure notes: infra/README.md
- Lambda extension contract: lambdas/README.md