Serverless Platform & CI/CD
This is how I deploy the site you're using. Terraform, GitHub Actions with OIDC, and serverless infrastructure — all defined as code.
My Role
I designed and maintain the entire deployment pipeline and infrastructure for this website, from the GitHub Actions workflow to the Terraform configuration and Lambda handlers.
The Problem
Many teams deploy web applications with manual steps, long build times, and unclear infrastructure state. Someone clicks "deploy" in a console, hopes nothing breaks, and has no way to reproduce the environment or roll back cleanly. The result is slow releases, fragile infrastructure, and no confidence in changes.
How It Worked
This is the actual deployment pipeline for this site1. Provision infrastructure (job: terraform-apply)
A push to main starts the workflow. GitHub Actions assumes an AWS role through OIDC, then Terraform provisions the infrastructure.
Loading diagram…
2. Build and publish the site (job: deploy-site)
This job starts only after terraform-apply succeeds. The build runs before any AWS credentials are configured.
Loading diagram…
3. Serving a page
CloudFront maps known routes to prerendered pages, fetches them from the private S3 bucket, and the browser then runs the React app. Unknown paths return the 404 page.
Loading diagram…
4. Contact form
The Lambda writes the inquiry to DynamoDB first, then sends the owner notification and a receipt through SES. If an email fails, the inquiry stays saved.
Loading diagram…
Both jobs authenticate to AWS with GitHub OIDC (no stored access keys): terraform-apply runs Terraform, and deploy-site builds the site, syncs it to S3, and invalidates CloudFront. The OIDC provider and deploy role, the Terraform state bucket, and the verified SES sender were created outside this Terraform configuration. A CloudFront Function maps known routes to prerendered pages. Unknown paths and missing assets return the 404 page with HTTP 404. The contact Lambda writes the inquiry to DynamoDB first, then sends the owner notification and a receipt to the requester through SES. If an email fails, the Lambda logs a warning and the inquiry stays saved; the visitor still sees success because the inquiry was accepted.
Design Decisions
OIDC avoids long-lived AWS credentials in the repository. Terraform state is stored remotely in S3, and resources that existed before the configuration was written are imported into state by the workflow on each run. The deploy workflow applies Terraform without a manual approval step. CloudFront serves the static site from a private S3 bucket through origin access control, and every deploy invalidates the cache.
Results
Deployments run from a push to main with no manual console steps, and the infrastructure is described in Terraform. I have not tested rebuilding the whole environment from an empty account.
Working through a similar problem?
Discuss a project →