Skip to content

tysoncung/ai-platform-aws-examples

Repository files navigation

AI Platform AWS - Examples

Runnable examples for building AI applications on AWS. Each folder is self-contained - clone, configure, deploy.

Companion repo to ai-platform-aws.

Examples

# 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

Prerequisites

  • Node.js 20+
  • AWS account with CDK bootstrapped
  • API keys for at least one provider (OpenAI, Anthropic, or AWS Bedrock)

Quick Start

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 dev

Article Series

This repo accompanies the Dev.to series "Building an AI Platform on AWS from Scratch":

  1. Why I Built My Own AI Platform (and Why You Might Too)
  2. We Started with Lambdas. Here's What Broke.
  3. The Gateway Pattern - One API, Any Model
  4. Building a RAG Pipeline That Actually Works
  5. From Lambdas to Agents - ECS for Orchestration
  6. The TypeScript SDK - Making It Developer-Friendly
  7. Cost Tracking, Auth & Production Hardening
  8. Full Platform Walkthrough

Architecture

                    +------------------+
                    |   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         |
     +------------------+     +--------------------+

License

MIT

About

Runnable examples for building AI applications on AWS - gateway, RAG, agents, streaming, cost tracking

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors