Developer Rebuilds Agentic RAG App on AWS Serverless, Ditching EC2 and a Database

A developer has documented migrating an agentic retrieval-augmented generation (RAG) application from a single AWS EC2 instance to a fully serverless AWS architecture. The original setup ran six Docker Compose containers on a t4g.small instance, loading a 24,775-fragment corpus into RAM on every run and costing around $15 per month even when idle. The new architecture replaces this with a Lambda-based API, S3 Vectors for storage, DynamoDB for conversations and feedback, and Amazon Bedrock for inference using Nova and Titan models. A key decision in the migration was deleting a Postgres database rather than migrating it, treating the corpus as a build artifact instead of a runtime dependency. The project also adopts proper infrastructure as code, eliminating the earlier reliance on bash scripts and manual SSH deployments.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in