How it works
Serving the page
- Browservisitor
- Route 53DNS
- CloudFrontCDN + HTTPS
- S3private bucket
Counting visitors
- Page JavaScriptfetch on load
- API Gatewaythrottled REST API
- LambdaPython
- DynamoDBatomic counter
Deploying changes
- git pushto main
- GitHub ActionsOIDC, no stored keys
- S3 syncupload changes
- CloudFrontcache invalidation
Highlights
- Private by default. The S3 bucket blocks public access; only this CloudFront distribution can read it.
- Locked-down API. CORS allows only this domain, and API Gateway rate-limits requests.
- Accurate counting. DynamoDB updates the count atomically, so simultaneous visitors are never lost.
- Keyless CI/CD. GitHub Actions gets short-lived AWS credentials through OIDC, limited to this repository.
- Cost guardrail. An AWS Budget alert fires if spending passes $10 a month.
Want the details?
The GitHub repository has the full write-up: architecture, security decisions, the deployment pipeline, and the lessons I learned along the way.
View the repository on GitHub