A serverless full-stack web app template you copy and grow into your own app. Not a framework — you own every file.
Copy, deploy with a single command, then replace the sample todo app with your own features.
- Working sample app — A todo app with authentication, DB CRUD, async jobs, and real-time notifications wired end-to-end. Designed as a readable reference for AI coding agents and humans alike.
- End-to-end type safety — Types flow from Prisma ORM through Zod schemas and Server Actions to React components in a single chain.
- Serverless from day one — Fully serverless architecture starting under $10/month that scales without operational overhead.
- Integrated DB migration — Schema migration is integrated into the CDK deploy process via CDK Trigger, providing a development-to-production path out of the box.
You can refer to the blog article for more details (also Japanese version).
The kit includes a simple todo app to demonstrate how all components work together.
Sign in/up page redirects to Cognito Managed Login.After login, you can add, delete, and manage your todo items. The translate button triggers an async job and pushes a real-time notification to refresh the page.
| Service | Role |
|---|---|
| Aurora PostgreSQL Serverless v2 | Relational database with Prisma ORM |
| Next.js App Router on Lambda | Unified frontend and backend |
| CloudFront + Lambda Function URL | Content delivery with response streaming |
| Cognito | Authentication (email by default, OIDC federation supported) |
| AppSync Events + Lambda | Async jobs and real-time notifications |
| EventBridge | Scheduled jobs |
| CloudWatch + S3 | Access logging |
| CDK | Infrastructure as Code |
Fully serverless — high cost efficiency, scalability, and minimal operational overhead.
Prerequisites:
Use the GitHub template ("Use this template" button) or clone and copy:
git clone https://github.com/aws-samples/serverless-full-stack-webapp-starter-kit.git my-app
cd my-app
rm -rf .git && git init
# Record the kit version in your initial commit for future reference
git add -A && git commit -m "Initial commit from serverless-full-stack-webapp-starter-kit vX.Y.Z"- Update the application name (stack name, tags) in
cdk/bin/cdk.ts - Set a custom domain in
cdk/bin/cdk.ts - Remove
cdk.context.jsonfromcdk/.gitignoreand commit it (recommended for your own project) - Switch from
prisma db pushtoprisma migrateif you need migration history
cd cdk
npm ci
npx cdk bootstrap
npx cdk deploy --allInitial deployment takes about 20 minutes. After success, you'll see:
✅ ServerlessWebappStarterKitStack
Outputs:
ServerlessWebappStarterKitStack.FrontendDomainName = https://web.example.com
ServerlessWebappStarterKitStack.DatabaseSecretsCommand = aws secretsmanager get-secret-value ...
ServerlessWebappStarterKitStack.DatabasePortForwardCommand = aws ssm start-session ...
Open the FrontendDomainName URL to try the sample app.
Note:
DatabasePortForwardCommandestablishes a local connection to your RDS database, andDatabaseSecretsCommandretrieves database credentials from Secrets Manager.
See AGENTS.md for development guide — local development setup, authentication patterns, async job setup, DB migration, and coding conventions.
To add social sign-in (Google, Facebook, etc.), see Add social sign-in to a user pool.
This kit follows Semantic Versioning. Since users copy (not fork) this kit, breaking changes are introduced as new major versions without a lengthy deprecation cycle.
Sample cost breakdown for us-east-1, one month, with cost-optimized configuration:
| Service | Usage Details | Monthly Cost [USD] |
|---|---|---|
| Aurora Serverless v2 | 0.5 ACU × 2 hour/day, 1GB storage | 3.6 |
| Cognito | 100 MAU | 1.5 |
| AppSync Events | 100 events/month, 10 hours connection/user/month | 0.02 |
| Lambda | 1024MB × 200ms/request | 0.15 |
| Lambda@Edge | 128MB × 50ms/request | 0.09 |
| VPC | NAT Instance (t4g.nano) × 1 | 3.02 |
| EventBridge | Scheduler 100 jobs/month | 0.0001 |
| CloudFront | Data transfer 1kB/request | 0.01 |
| Total | 8.49 |
Assumes 100 users/month, 1000 requests/user. Costs could be further reduced with Free Tier.
cd cdk
npx cdk destroy --force- Masashi Tomooka (tmokmss) — original author
- Kazuho Cryer-Shinozuka (badmintoncryer)
See CONTRIBUTING.md for guidelines.
Contributors (human and AI) must read .serverless-full-stack-webapp-starter-kit/design/DESIGN_PRINCIPLES.md before making changes. It defines the design decisions and constraints that govern this kit.
See CONTRIBUTING for more information.
This library is licensed under the MIT-0 License. See the LICENSE file.


