Intro
Over the last few weeks, I’ve been working on projects that combine my AWS learning with my background in Growth Engineering.
I wanted something more relevant to my domain than the classic “Cloud Resume” challenge. So I built an AB Testing Tracker — a simple, serverless app to track experiments, impressions, clicks, and calculate click-through rates (CTR).
Demo link - https://ab-testing-tracker-frontend.vercel.app/
Architecture & What the App Does
Here’s the high-level architecture:
Frontend: Next.js app hosted on Vercel, fetches experiment manifest from S3 via CloudFront.
Backend: AWS Lambda (Node.js) with API Gateway to receive experiment events.
Storage: DynamoDB for storing impressions, clicks, and calculating CTR.
CDN: CloudFront with OAI (Origin Access Identity) for secure access to S3.
The app supports:
Tracking impressions and clicks for AB tests.
Aggregating stats by variant and calculating CTR.
Returning results via a simple API.
Cost Optimization
S3 Lifecycle Policies to delete unused objects after a set time.
DynamoDB TTL for expiring old events automatically.
Fully serverless → No idle server cost, Lambda is pay-per-use.
Security
S3 bucket is private, accessible only via CloudFront using OAI.
Can move DynamoDB and Lambda to a VPC with VPC Endpoints for tighter control.
Learnings & Notes
Used Vercel for quick and painless frontend deployment.
Fixed a CORS issue by switching CloudFront’s response header policy from SimpleCORS to CORS With Preflight.
Leveraged Cursor and ChatGPT for coding assistance and documentation.
Top comments (0)