π§° How I Built a Serverless TODO App with AWS Lambda, DynamoDB & Vercel
Iβve always wanted to build a real full-stack application thatβs completely serverless, scalable, and affordable to host.
This project marks that milestone β a simple but powerful TODO App built with React + Vite on Vercel (frontend) and an AWS backend powered by Cognito, Lambda, and DynamoDB.
π― Motivation
Most of my side projects started as experiments β a script here, a local app there. But I wanted to go one step further and deploy a working cloud application that could:
- Scale without managing servers
- Stay within free-tier limits (important for solo devs!)
- Integrate modern authentication (AWS Cognito)
- Be fully automated using Infrastructure as Code (AWS CDK)
Instead of learning theory from tutorials, I decided to build something end-to-end β a small, achievable project that would teach me how real serverless systems fit together.
π§© What I Built
Todo App (Vercel + AWS)
A lightweight yet production-ready serverless TODO manager with:
- βοΈ React + Vite SPA hosted on Vercel
- π AWS Cognito Hosted UI for user authentication (email/password for now, social login ready for later via identity providers)
- π§ AWS Lambda Function URL exposing CRUD endpoints (Create, Read, Update, Delete)
- πΎ DynamoDB (on-demand mode) to store tasks per user
- π AWS CDK (TypeScript) to automate deployment of all backend infrastructure (Cognito, Lambda, DynamoDB, IAM roles, etc.)
- π AWS Amplify JS (Auth module) integrated with the frontend to handle sign-in and token-based API calls
Everything is stateless and serverless, meaning no EC2, no manual scaling, and no backend servers to patch β ever.
π Architecture Overview
Hereβs the flow:
- The React app is deployed to Vercel.
- Users sign in using Cognito Hosted UI.
- Upon login, the app stores a JWT token.
- Every API call goes through the Lambda Function URL, validated using that token.
- The Lambda reads and writes tasks to DynamoDB, partitioned by
userId
.
π§ Note: Lambda Function URLs are public by default β the token validation happens inside the Lambda to ensure secure access.
Itβs clean, secure, and built on services that can scale infinitely.
βοΈ Tech Stack
Layer | Technology |
---|---|
Frontend | React + Vite + AWS Amplify JS (Auth module) |
Hosting | Vercel (free tier) |
Auth | AWS Cognito Hosted UI |
API | AWS Lambda (Function URL) |
Database | DynamoDB (on-demand) |
IaC | AWS CDK (TypeScript) |
π΅ AWS Free Tier β Cost & Scalability
One of my key goals was to stay within AWSβs always-free tier, so I could build, test, and learn without worrying about surprise bills.
Hereβs how each service fits into the free tier and what kind of traffic it can handle before costs start:
AWS Service | Free Tier Limit | What It Covers | Practical Impact |
---|---|---|---|
AWS Lambda | 1M requests/month + 400,000 GB-seconds compute/month | All function invocations | Enough for tens of thousands of TODO operations per month. Perfect for hobby apps or small prototypes. |
Amazon DynamoDB (On-Demand) | 25 GB free storage | Automatically scales with traffic | No need to pre-provision read/write capacity β great for unpredictable workloads. |
Amazon Cognito | 50,000 monthly active users (MAUs) free | Authentication and token management | Easily supports most side projects and MVPs without cost. |
AWS CDK / CloudFormation | Free | Infrastructure management and provisioning | No runtime cost β only pays for created resources (still free if resources are within free tier). |
Vercel Hosting | Free plan for hobby projects | Static site hosting and serverless frontend delivery | Perfect for individual or small-team projects. |
AWS Amplify Hosting | 1,000 build minutes/month + 5 GB storage (free for first year only) | Static site hosting on AWS | Would have kept everything inside AWS, but the free tier is limited to the first year. |
AWS Budget & Cost Monitor | Free | Budget alerts and cost tracking | Always set up a budget alert (e.g., $1 threshold) to monitor expenses and avoid surprises. |
AWS API Gateway (optional) | 1M REST API calls/month | Only if used instead of Lambda URL | Useful for advanced routing or throttling setups later. |
π§ Tip: All of these services automatically scale down when idle, meaning you only pay when your app is being used β ideal for experimentation and side projects.
π‘ Lessons Learned
- CDK is game-changing β writing infrastructure in TypeScript feels natural once you get used to it.
- Vercel + AWS work beautifully together β frontend on Vercel, backend on AWS, no friction.
- JWT validation in Lambda keeps APIs lightweight yet secure.
- Keeping things modular (frontend + backend folders) makes local dev and deployment easy.
- Always configure budget alerts early β theyβre free and prevent billing surprises.
π§ Whatβs Next
- Add Google & GitHub sign-in via Cognito Identity Providers.
- Add real-time updates using AWS AppSync or WebSockets.
- Build automated deployments using GitHub Actions (with AWS OIDC roles, no static keys).
- Write detailed follow-ups on each part (Cognito setup, CDK deployment, etc.).
β€οΈ Final Thoughts
This project isnβt just a TODO app β itβs a template for future serverless ideas.
If youβre someone whoβs been reading about AWS and Vercel but never connected the dots, this kind of project is the perfect start. Itβs small enough to finish, yet rich enough to teach you real-world cloud development.
β¨ Coming Soon
In my next post, Iβll share a step-by-step guide to set up this project from scratch β
perfect for beginners who want to clone, deploy, and learn while building along.
Stay tuned! π
Thanks for reading π
This was my first post on Dev.to β more articles coming soon!
Top comments (0)