Travis Pollard

whoami
travis@travispollard.com
Cloud / DevOps Engineer
_

Architecture

Architecture diagram: Route 53 and CloudFront serving a static Next.js site from S3, with CodePipeline and CodeBuild handling deployments and a Lambda + DynamoDB visitor counter behind API Gateway
# Request path
Route 53 resolves travispollard.com and www.travispollard.com to the CloudFront distribution via alias records
CloudFront terminates TLS with an ACM certificate (SNI, TLS 1.2 minimum) and redirects any HTTP request to HTTPS
Cache misses fall through to the S3 static website origin holding the exported Next.js build
The visitor counter calls API Gateway, which invokes a Python Lambda that increments a DynamoDB item and returns the count
# Commit to production
1. A push to the repository triggers the CodePipeline source stage
2. CodeBuild installs dependencies with npm ci and installs Playwright browsers
3. next build produces a fully static export of the site into frontend/out
4. Playwright smoke tests run against the build before anything ships
5. The build artifact is published to the S3 bucket that backs the CloudFront distribution

Infrastructure

ResourceConfiguration
S3Static website hosting for the exported Next.js build
CloudFrontGlobal CDN, TLS 1.2_2021 minimum, HTTP to HTTPS redirect, compression, PriceClass_100
Route 53Hosted zone with alias, MX, NS, and SOA records, plus ACM validation records
ACMTLS certificate for the apex and www names, DNS validated through Route 53
API Gateway + Lambda + DynamoDBVisitor counter written in Python with boto3
CodePipeline + CodeBuildBuild, test, and deploy on every push, defined in buildspec.yml
TerraformEvery resource above is defined in modules: route53, s3, acm, cloudfront

Writeup

I wrote about building this stack end to end, from an empty S3 bucket to a working CI/CD pipeline: From S3 to CI/CD: My Cloud Resume Challenge Journey

Source

The Terraform configuration and the Next.js frontend for this site live in one repository: github.com/jtravisp/travispollard.com