A serverless AI chat application built on AWS. Converse with Claude foundation models through a secure, production-grade interface.
Haiku to Opus โ pick the right model for every task
Track tokens, cost, and usage per user and model
Cognito auth, CloudFront CDN, private S3 origin
Lambda + API Gateway โ zero servers to manage
Sign in to start chatting
I'm powered by Amazon Bedrock. Send me a message and I'll respond using Claude.
Web Application Firewall protecting the CloudFront distribution with AWS managed rule groups and rate limiting.
CDN distribution with three behaviors: default serves static files from S3, /api/chat and /api/usage route to API Gateway. HTTPS enforced, HTTP/2 enabled. WAF-protected. Host-based access control (custom domain only).
Private S3 bucket hosts the static SPA frontend. All public access blocked โ served exclusively through CloudFront via Origin Access Control (OAC).
Shared Cognito user pool with OAuth2 authorization code flow. Browser redirects to Cognito Hosted UI, exchanges code for JWT tokens. No client secret (public SPA client).
Regional REST API with Cognito authorizer validating JWT on every request. POST /api/chat for conversations, GET /api/usage for analytics. CORS enabled with gateway response headers.
Node.js 22 on ARM64 (Graviton). Handles chat (Bedrock Converse), usage tracking (DynamoDB writes), and usage queries (DynamoDB reads + Cost Explorer).
Converse API with US inference profiles. 5 Claude models from Haiku 4.5 to Opus 4.6. User selects model per-message. Throttle detection with graceful retry.
Usage tracking table with per-user, per-model, per-month granularity. Tracks input/output tokens and request counts. PAY_PER_REQUEST billing.
Queried for actual AWS Bedrock billing data. Provides real cost alongside token-based estimates. Data has 24โ48h delay from AWS.
| Model | Requests | Input Tokens | Output Tokens | Est. Cost |
|---|---|---|---|---|
| Loading usage data... | ||||
| User | Requests | Input Tokens | Output Tokens | Est. Cost |
|---|---|---|---|---|
| Switch to "All Users" view | ||||