Putting AWS Skills to Work: Building an AB Testing Tracker

ajith manmadhanajith manmadhan
2 min read

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.


Full Project & Code

https://github.com/ajithmanmu/ab-testing-tracker

0
Subscribe to my newsletter

Read articles from ajith manmadhan directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

ajith manmadhan
ajith manmadhan

Hey, I’m Ajith 👋 — a Senior Software Engineer who loves building things that scale and actually move the needle. I’ve spent 17 years working across full-stack, cloud (AWS Certified), and growth engineering — from launching new subscription models to optimizing performance for millions of users. I write about growth engineering, AWS, and system design, sharing lessons learned (and mistakes made) along the way.