Runnable examples for building AI applications on AWS. Each folder is self-contained - clone, configure, deploy.
Companion repo to ai-platform-aws.
| # | Example | What You'll Build | Article |
|---|---|---|---|
| 01 | Multi-Provider Gateway | Single API that routes to OpenAI, Anthropic, or Bedrock | Part 3: One API, Any Model |
| 02 | RAG with MongoDB Atlas | Document ingestion + vector search + AI answers | Part 4: RAG That Actually Works |
| 03 | Lambda AI Tool | Single-purpose AI Lambda (summarize, classify, extract) | Part 2: We Started with Lambdas |
| 04 | ECS Agent Orchestrator | Multi-step AI agent that calls Lambda tools | Part 5: From Lambdas to Agents |
| 05 | Streaming Chat | Server-Sent Events streaming from any provider | Part 3: One API, Any Model |
| 06 | Cost Tracking | Per-user usage tracking and budget alerts | Part 7: Cost, Auth & Production |
| 07 | Full Stack | Complete platform with dashboard | Part 8: Full Walkthrough |
- Node.js 20+
- AWS account with CDK bootstrapped
- API keys for at least one provider (OpenAI, Anthropic, or AWS Bedrock)
git clone https://github.com/tysoncung/ai-platform-aws-examples.git
cd ai-platform-aws-examples/01-multi-provider-gateway
npm install
cp .env.example .env # add your API keys
npm run devThis repo accompanies the Dev.to series "Building an AI Platform on AWS from Scratch":
- Why I Built My Own AI Platform (and Why You Might Too)
- We Started with Lambdas. Here's What Broke.
- The Gateway Pattern - One API, Any Model
- Building a RAG Pipeline That Actually Works
- From Lambdas to Agents - ECS for Orchestration
- The TypeScript SDK - Making It Developer-Friendly
- Cost Tracking, Auth & Production Hardening
- Full Platform Walkthrough
+------------------+
| Your App/SDK |
+--------+---------+
|
+--------v---------+
| AI Gateway | <-- Example 01, 05
| (API Gateway |
| + Lambda) |
+--------+---------+
|
+--------------+--------------+
| | |
+--------v---+ +------v-----+ +-----v------+
| OpenAI | | Anthropic | | Bedrock |
+------------+ +------------+ +------------+
+------------------+ +--------------------+
| Lambda AI Tools | | ECS Agent |
| (Example 03) |<----| Orchestrator |
| - Summarize | | (Example 04) |
| - Classify | | - Multi-step |
| - Extract | | - Tool calling |
+------------------+ | - Streaming |
+--------------------+
+------------------+ +--------------------+
| RAG Pipeline | | Cost Tracking |
| (Example 02) | | (Example 06) |
| - Ingest docs | | - Per-user usage |
| - Vector search | | - Budget alerts |
| - MongoDB Atlas | | - DynamoDB |
+------------------+ +--------------------+
MIT