Building a serverless AI agent platform on AWS for $0.01/month with Claude Code

Project Overview
Serverless OpenClaw is a full-stack serverless AI agent platform built entirely through conversational prompts to Claude Code over 29 hours across 5 weeks. The platform runs the OpenClaw AI agent on-demand on AWS with a React web chat UI and Telegram bot, deploying the entire infrastructure with a single cdk deploy command.
Technical Details
Cost Optimization: The project reduced monthly costs from a typical ~$70+ serverless setup down to $0.01/month on Lambda with zero idle costs. Specific eliminations include:
- NAT Gateway: -$32/month
- ALB (Application Load Balancer): -$18/month
- Fargate always-on: -$15/month
- Interface VPC Endpoints: -$7/month each
- Provisioned DynamoDB: Variable savings
Performance Metrics:
- Cold start: 1.35s (Lambda), 0.12s warm
- Total AWS cost during development: ~$0.25
- Monthly running cost: ~$0.01 (Lambda)
Code Quality:
- Unit tests: 233
- E2E tests: 35
- CDK stacks: 8
- TypeScript packages: 6 (monorepo)
Development Process
The entire project was built without manual coding—just prompts, reviews, and course corrections. Claude Code was used for:
- Architecture design: "Design a serverless platform that costs under $1/month" → Claude Code produced the PRD, CDK stacks, network design
- TDD workflow: Claude Code wrote tests first, then implementation (233 tests before a single deploy)
- Debugging sessions: Docker build failures, cold start optimization (68s → 1.35s), WebSocket auth issues
- Phase 2 migration: Moved from Fargate to Lambda Container Image mid-project, including S3 session persistence and smart routing
The prompts were originally in Korean, and Claude Code handled bilingual development seamlessly.
Tech Stack
TypeScript monorepo (6 packages) on AWS using: CDK for IaC, API Gateway (WebSocket + REST), Lambda + Fargate Spot for compute, DynamoDB, S3, Cognito auth, CloudFront + React SPA, Telegram Bot API. Multi-LLM support via Anthropic API and Amazon Bedrock.
Practical Patterns
API Gateway instead of ALB: Saves $18+/month. WebSocket + REST on API Gateway with Lambda handlers.
Tutorial Structure
The 7-chapter "vibe coding" tutorial documents every prompt, failure, and fix:
- Chapter 1: The $1/Month Challenge (~2h) - PRD, architecture design, cost analysis
- Chapter 2: MVP in a Weekend (~8h) - 10-step Phase 1, CDK stacks, TDD
- Chapter 3: Deployment Reality Check (~4h) - Docker, secrets, auth, first real deploy
- Chapter 4: The Cold Start Battle (~6h) - Docker optimization, CPU tuning, pre-warming
- Chapter 5: Lambda Migration (~4h) - Phase 2, embedded agent, S3 sessions
- Chapter 6: Smart Routing (~3h) - Lambda/Fargate hybrid, cold start preview
- Chapter 7: Release Automation (~2h) - Skills, parallel review, GitHub releases
Each chapter includes: the actual prompt given → what Claude Code did → what broke → how we fixed it → lessons learned → reproducible commands.
📖 Read the full source: r/ClaudeAI
👀 See Also

Master OpenClaw on Your Android Smartphone: A Comprehensive Tutorial
Curious about harnessing the potential of OpenClaw on your Android smartphone? This tutorial provides step-by-step guidance on getting started, covering essential tips and tricks from the vibrant OpenClaw community.

Building a Custom Hindi Glossary System with Claude: From 76% to 92% Accuracy in 10 Months
A solo dev in Bangalore built a custom glossary system for Claude to improve Hindi domain vocabulary accuracy from 76% to 92%. Example-based terms with context sentences worked best.

iOS Developer Shares Claude Code Best Practices After Shipping Multiple Apps
An iOS developer with cybersecurity background outlines specific practices for using Claude Code effectively, including environment separation, observability setup, and avoiding technical debt accumulation.

Practical Guide to Creating Claude Skills: Structure, Triggers, and Scripts
Claude Skills are instruction manuals that automate repetitive tasks, stored as folders with a SKILL.md file in ~/.claude/skills/. The guide explains YAML triggers, script integration, and multi-skill orchestration rules.