Challenge
An AI app builder (Emergent) can scaffold a working full-stack app in minutes. "Runs on my machine" and "safe to expose on a real domain" are different bars entirely — the actual challenge was closing that gap.
An AI app builder (Emergent) can scaffold a working full-stack app in minutes. "Runs on my machine" and "safe to expose on a real domain" are different bars entirely — the actual challenge was closing that gap.
Three concrete swaps, not a rewrite: MongoDB (Motor) for draws, subscribers, saved picks, and ingest metadata became four DynamoDB tables with GSIs for the two lookups Mongo did with a plain query; the in-process APScheduler cron running inside the FastAPI process became EventBridge rules invoking a separate ingest Lambda; and a single implicitly-trusted process became two Lambdas with two least-privilege IAM roles, each scoped only to the tables and actions it actually touches. Also deleted a proprietary, unshippable LLM SDK (litellm/openai/google-genai/pandas/numpy, ~1.2GB) for the public Anthropic SDK — which is also what let the deploy shrink from a Docker/ECR image to a plain Lambda zip. analytics.py and backtest.py were left untouched: pure functions over in-memory data, no persistence coupling, nothing to fix.
The Anthropic key started in a scaffolded app's plaintext .env. It now lives in SSM Parameter Store as a SecureString, with the API Lambda's IAM role scoped to ssm:GetParameter and kms:Decrypt on that one parameter — the value never enters Terraform state, a Lambda console env var, or source control, and rotating it is one CLI call, not a redeploy.
A serverless Python backend behind API Gateway, real scheduled data ingestion, and Claude-powered trend analysis, all Terraform-managed and served through the portfolio's existing CloudFront distribution.