I recently finished the Cloud Resume Challenge : host a resume as a static site on a cloud provider, add a serverless visitor counter, define everything as code, and deploy it all through CI/CD. You can see the result at charliewinslow.com .
One goal drove most of my decisions: keep the bill as close to zero as possible. This post covers the architecture, how I kept costs down, and the things that broke along the way, which taught me more than the parts that worked on the first try.
The architecture
A visitor's browser resolves my domain through Route 53, which points at a CloudFront distribution. CloudFront serves the site over HTTPS using a free ACM certificate, and it pulls files from a private S3 bucket using Origin Access Control, so the bucket itself is never public.
When the page loads, a small script calls an API Gateway HTTP API. That triggers a Python Lambda function, which increments a counter in DynamoDB and returns the new count.…