Anthony Harper
Senior Full-Stack Software Engineer | Healthcare Technology Lead
AnthonyHarper.dev Deep Dive
Overview
I wanted to establish for myself a personal resume and portfolio site and to build it using the technologies that I wanted to highlight, so that the showcase itself would be a showcase piece. This website is a module in my Terraform repository, and functions just like any other project. It is AWS Serverless, making use of Route53, CloudFront, S3, CodeCommit, CodePipeline, CodeBuild, and Lambda.
There is no active database or application server, and the content of the site is purely static HTML, CSS, and JavaScript. Deployments are automated in a manner similar to the control plane, in that when code is pushed to envs/prod, it triggers a CodePipeline which runs the CodeBuild stage, deploys to S3, and then triggers a cache-clearing Lambda to refresh the CloudFront cache.
Changes in the project repository for the front-end site never trigger any modification to infrastructure and are fully isolated from the control plane.
The Terraform module
Before building the site itself, all of the resources needed to run the site were specified in the infrastucture control plane project, which is a repository of terraform configurations organized into modules. The module provisions:
- A dedicated CodeCommit repository and CI/CD pipeline isolated entirely to application content.
- A private S3 origin bucket locked down exclusively behind CloudFront using Origin Access Control (OAC)—preventing any public S3 bucket exposure.
- An ACM SSL/TLS certificate along with Route53 DNS alias records for both the root domain and www subdomain.
Note: Because my foundational infrastructure is hosted in us-east-1, it naturally aligned with CloudFront's requirement that edge SSL certificates must be provisioned in that specific region, so I dodged that complication.
- A dedicated AWS Lambda function wired into the deployment pipeline.
The Lambda Integration Exercise
While a basic CLI command can invalidate a CloudFront cache, I intentionally integrated a custom AWS Lambda function into this module. This served as a deliberate exercise to demonstrate end-to-end serverless orchestration: managing Lambda code packaging, defining execution roles with least-privilege IAM policies via Terraform, and triggering serverless compute routines dynamically as part of an automated CI/CD pipeline.
The website content
All website content is authored in Markdown format and committed to the website's dedicated CodeCommit repo (which is distinct from the infrastructure repo). A static site generation process is triggered in CodeBuild when a commit is merged into envs/prod which translates site markdown into HTML and copies over static HTML and CSS. No front-end frameworks are currently in use. I decided to keep everything very straightforward for now. The only portion of the front-end code that is even "aware" that it is deployed as an AWS app is buildspec.yml, which compiles and runs the static site generator and specifies the deployable dist artifact that it creates.