Ai4
Migrating vector similarity search from DynamoDB to native Amazon S3 Vectors reduces AI query latency from three seconds to 150 milliseconds, eliminating backend compute bottlenecks in serverless architectures.
AI-assisted summary of Building Scalable Enterprise AI Systems Solo, LLMs, AWS Bedrock & Serverless Architecture With Yahoo — original source. Check the original for full context.
Source published:
Detailed notes
## Background Published by the Ai4 channel on YouTube on August 28, 2025, this talk features Soujanya Vullam, a Software Development Engineer II at Yahoo. According to the session description, it explores how a solo developer independently designed and deployed a secure, production-ready AI Q&A platform using LLMs, AWS Bedrock, AWS serverless architecture, and AI-assisted tools like Cursor and Eraser.io.
## TL;DR The presentation chronicles the end-to-end design of 'Epic Q&A,' an enterprise documentation and code Q&A platform built by a single engineer. An initial serverless setup storing vector embeddings in Amazon DynamoDB resulted in a 3-second query latency bottleneck due to calculating cosine similarity inside AWS Lambda functions. Migrating to the newly released Amazon S3 Vectors resolved the compute overhead and enabled sub-second ANN similarity searches with bundled chunk attribution, slashing response times down to 150 milliseconds. The session illustrates how combining AWS managed services, structured evaluations, and AI-assisted developer tooling allows solo engineers to build cost-effective systems that meet rigorous enterprise design and security standards.
## Atmosphere & style The talk is brisk, technical, and pragmatic, delivering a focused architectural post-mortem packed with system diagrams, CloudWatch metrics, and concrete engineering trade-offs. Vullam presents with earnest enthusiasm and methodical clarity, making complex serverless workflows and retrieval-augmented generation concepts feel accessible and actionable. The session maintains an intense, information-dense momentum right up until the end, when the conference moderator abruptly steps in to yield the stage for the next presenter.
## Key takeaways - [00:04](https://www.youtube.com/watch?v=vv3ydGd9Anc&t=4s) Building enterprise-grade AI requires extending traditional system design principles to include observability and continuous evaluations (evals) for measuring model accuracy, relevance, and coherence. - [03:21](https://www.youtube.com/watch?v=vv3ydGd9Anc&t=201s) Storing high-dimensional embeddings in DynamoDB introduces severe latency bottlenecks because Lambda compute instances must pull raw arrays and perform cosine similarity math in memory. - [07:10](https://www.youtube.com/watch?v=vv3ydGd9Anc&t=430s) AWS Bedrock provides a fully managed, serverless interface to decouple embedding generation from LLM text generation on a pay-per-use model without provisioning GPU clusters. - [07:10](https://www.youtube.com/watch?v=vv3ydGd9Anc&t=430s) Pairing Amazon S3 with CloudFront serves as a cost-effective dual-purpose foundation for both static React web asset delivery and long-term raw document storage. - [09:56](https://www.youtube.com/watch?v=vv3ydGd9Anc&t=596s) Standard relational and NoSQL databases lack native indexing algorithms to perform sub-second approximate nearest neighbor (ANN) searches across high-dimensional vector spaces. - [12:45](https://www.youtube.com/watch?v=vv3ydGd9Anc&t=765s) Migrating to Amazon S3 Vectors streamlines RAG workflows by returning matched text chunks and metadata directly with vector similarity responses, eliminating secondary data queries. - [12:45](https://www.youtube.com/watch?v=vv3ydGd9Anc&t=765s) A modular serverless architecture allows vector backend components to be swapped cleanly with localized code and IAM permission updates rather than full system re-architecting. - [15:38](https://www.youtube.com/watch?v=vv3ydGd9Anc&t=938s) Pairing automated CloudWatch dashboards with LLM tracing tools like LangSmith and TensorBoard provides complete operational and accuracy telemetry across development iterations. - [18:50](https://www.youtube.com/watch?v=vv3ydGd9Anc&t=1130s) Adopting native vector search and serverless optimization drops end-to-end API response latency from nearly 3 seconds down to approximately 150 milliseconds. - [18:50](https://www.youtube.com/watch?v=vv3ydGd9Anc&t=1130s) Enterprise generative AI risks such as hallucinations, bias, and context gaps are mitigated through strict RAG grounding, document-boundary isolation, and Bedrock content filters. - [18:50](https://www.youtube.com/watch?v=vv3ydGd9Anc&t=1130s) Solo engineers can build and operate scalable, highly secure enterprise architectures for nominal infrastructure costs by leveraging AI-assisted tools like Cursor, Eraser.io, and Gemini.
## Detailed walkthrough ### [00:04](https://www.youtube.com/watch?v=vv3ydGd9Anc&t=4s) Building Enterprise-Grade AI Systems Solo: The Epic Q&A Web App
The presentation opens with a fundamental question that challenges conventional startup and engineering assumptions: "Can a solo developer build enterprise-grade AI systems?" For an independent engineer, bridging the gap between a quick proof-of-concept prototype and a truly production-ready, secure, modular, and scalable enterprise platform often seems out of reach. Driven by this challenge over several months, the speaker developed the Epic Q&A web application—an AI-powered platform capable of parsing massive books and code repositories, automatically generating documentation, and returning context-aware, intelligent answers to user queries in natural language.
Creating an enterprise-grade application requires adhering strictly to standard system design principles like modularity, scalability, security, and reliability. However, in the context of modern AI architectures, two additional pillars take center stage: observability and evaluations (evals). Observability allows engineers to inspect the internal state of an application via generated telemetry—logs, metrics, and distributed traces—to understand how the large language model makes its decisions, evaluate performance trends over time, and ensure stringent compliance with security protocols.
Evals diverge sharply from traditional unit testing by systematically benchmarking model outputs against targeted metrics and guidelines. By continually measuring dimensions such as accuracy, relevance, coherence, completeness, and helpfulness, evals safeguard system reliability, illuminate specific performance bottlenecks, and empower engineers to carry out informed, repeatable iterations across the entire AI development lifecycle.
- **Primary Challenge**: Determining whether a solo developer can progress beyond simple prototypes to architect a production-ready, enterprise-grade AI system. - **Core Use Case**: The Epic Q&A application processes dense codebases and voluminous books into structured documentation and answers natural language questions using semantic context. - **AI Evaluation Criteria**: System performance is measured against metrics including accuracy, relevance, coherence, completeness, and helpfulness.
---
[03:21](https://www.youtube.com/watch?v=vv3ydGd9Anc&t=201s) Initial Serverless Architecture and the DynamoDB Vector Bottleneck
To satisfy enterprise standards, the initial implementation was built entirely around managed AWS serverless infrastructure. When an end user submits a request, traffic is routed through Amazon Route 53 for DNS resolution and handled by a content delivery network (CloudFront/CDN) that serves the compiled React front-end assets stored in an Amazon S3 bucket. Authentication is enforced through Amazon Cognito; once authenticated, the client attaches JSON Web Tokens (JWT) to request headers, which are validated downstream at the Amazon API Gateway.
The API Gateway provides throttling and rate limiting, dispatching validated requests to specific AWS Lambda functions mapped to individual endpoints—such as listing library content, uploading raw source files or books, and handling user search queries. During document ingestion, Lambda splits the source text into distinct chunks, submits them to Amazon Bedrock to generate vector embeddings, and writes those embeddings directly into Amazon DynamoDB.
``` [User] ---> [Route 53] ---> [CDN / CloudFront] ---> [S3: Web UI] | (JWT via Cognito) v [API Gateway] | +-----------------+-----------------+ | (List / Query / Upload Endpoints) | v v [Lambda Functions] <===============> [AWS Bedrock] | (Embeddings / LLM) v [DynamoDB Storage] (Overhead: Cosine similarity & sorting computed in Lambda) ```
While DynamoDB provided high availability, automated scaling, and encryption at rest and in transit, it quickly exposed a critical architectural flaw. Because DynamoDB is a traditional NoSQL database lacking native vector indexing and vector similarity search primitives, the compute-heavy operations—namely calculating cosine similarity and sorting/ranking candidates against query vectors—had to be processed entirely inside the Lambda functions.
- **DNS & Asset Delivery**: Amazon Route 53 routes inbound web traffic; CloudFront CDN serves cached React UI assets stored in S3. - **Identity & Ingress**: Amazon Cognito issues JWTs for authentication, which are validated by Amazon API Gateway before triggering backend compute. - **Microservices via Lambda**: Granular Lambda functions govern distinct operations such as listing books, file uploads, and Q&A inference. - **Compute Bottleneck**: Storing high-dimensional vectors in DynamoDB forced Lambda functions to pull candidates and run cosine similarity calculations in memory, degrading query performance.
---
[07:10](https://www.youtube.com/watch?v=vv3ydGd9Anc&t=430s) Core Serverless Building Blocks and Early Design Decisions
Designing an enterprise system as a solo developer demands rigorous architectural choices early on to avoid runaway infrastructure maintenance and unmanageable operational overhead. Choosing AWS Bedrock provided access to foundation models for both natural language response generation and embedding synthesis, packaged as an auto-scaling, pay-per-use managed service with multi-nine availability. This allowed the platform to leverage specialized, distinct models optimized separately for semantic vector embedding generation versus conversational question answering without managing underlying GPU clusters.
Similarly, pairing Amazon S3 with CloudFront created a dual-purpose storage foundation. S3 served as the repository for raw document uploads and codebase archives, while also acting as the origin server for front-end static files (HTML, JavaScript, and CSS). CloudFront cached these UI assets at global edge locations to ensure low latency for global users, backed by S3's near-unlimited storage tier and built-in security controls.
At the compute layer, the combination of Amazon API Gateway and AWS Lambda provided an elastic backend with pay-per-use billing that completely eliminated idle server costs. Each operational path—listing items, document querying, and ingestion uploads—mapped directly to an isolated Lambda handler. API Gateway handled JWT verification against Cognito natively alongside request throttling and rate limiting, ensuring the backend remained protected against traffic spikes while maintaining strict access boundaries across endpoints.
- **AWS Bedrock**: Fully managed LLM infrastructure used for both vector embedding generation and Q&A text generation, chosen for its serverless pay-per-use billing and high availability. - **S3 & CloudFront Pairing**: S3 serves as an origin for UI code and long-term object storage for raw source documents, fronted by edge caching for rapid delivery. - **Compute Isolation**: Individual Lambda functions scale independently per endpoint without incurring idle infrastructure expenses. - **Built-in Governance**: API Gateway manages rate limits, burst throttling, and automatic JWT authorization checks before dispatching calls to Lambda handlers.
---
[09:56](https://www.youtube.com/watch?v=vv3ydGd9Anc&t=596s) Diagnosing the 3-Second API Latency and the Need for Vector Databases
Once the baseline implementation was running, CloudWatch metrics exposed a major latency issue: API responses were taking nearly 3 full seconds. Profiling traces pinpointed AWS Lambda as the primary bottleneck. Because DynamoDB stored the vector arrays merely as raw attributes, the Lambda compute layer had to retrieve the records, parse the numerical arrays, execute cosine similarity math across every record, and sort the ranked results before constructing the model context.
This performance wall prompted an evaluation of dedicated vector databases. Standard relational and NoSQL databases lack indexing strategies capable of executing approximate nearest neighbor (ANN) searches across millions of high-dimensional vectors at sub-second speeds. Vector databases solve this by storing data within specialized vector spaces and utilizing purpose-built indexing algorithms that navigate dense numerical representations in milliseconds.
Beyond raw speed, vector databases offer native support for operations essential to enterprise retrieval-augmented generation (RAG) pipelines, including metadata filtering and hybrid search (combining sparse keyword search with dense semantic retrieval). These capabilities are crucial across diverse domains, including chatbots, recommendation engines, media retrieval, and anomaly detection, where systems must quickly filter and retrieve the most relevant semantic context without burdening downstream compute instances with manual ranking algorithms.
- **Latency Baseline**: Early CloudWatch telemetry showed query response times hovering around 3 seconds due to Lambda compute overhead. - **Algorithmic Limitations of NoSQL**: Standard database indexes cannot natively execute vector distance metrics (such as cosine similarity or dot product) at scale. - **Role of Vector Databases**: Purpose-built vector engines store embeddings in indexed vector spaces to enable sub-second nearest-neighbor lookups, metadata filtering, and hybrid search.
---
[12:45](https://www.youtube.com/watch?v=vv3ydGd9Anc&t=765s) Migrating from DynamoDB to S3 Vectors
To resolve the compute bottleneck without introducing complex third-party infrastructure, the speaker turned to Amazon S3 Vectors—a feature newly introduced on July 15, 2025. Although not yet rolled out to every global region at the time of evaluation, it was accessible in the `us-east-1` (US East) region. Adopting S3 Vectors preserved native AWS integration, enabling infrastructure-as-code management via AWS CloudFormation and unified monitoring through Amazon CloudWatch without provisioning external clusters.
S3 Vectors provided significant operational and architectural advantages. Because vectors are stored alongside their raw chunk text and metadata directly within the database engine, an ANN similarity query returns the matched text chunks directly in the search response payload. This eliminated an entire secondary round-trip query to fetch the raw text from secondary storage. Passing these attribution chunks directly to the final API response introduced clear explainability, allowing developers and end users to inspect the exact source chunk used to ground the LLM's answer.
The architectural migration from DynamoDB to S3 Vectors highlighted the advantages of modular serverless design. The migration required no architectural overhaul: the system boundaries remained intact, and changes were confined to the query Lambda functions and IAM execution roles to grant access to the S3 Vectors API. Shifting the vector similarity math inside the managed database immediately unlocked substantial performance gains and simplified backend compute logic.
``` +------------------------------------------------------+ | Revised Architecture: S3 Vectors | +------------------------------------------------------+
[Client App] ---> [Route 53] ---> [CloudFront CDN] | v [Amazon Cognito] <-----------> [API Gateway] | v [AWS Lambda] / \ (Generate Emb) (Query Vectors + Chunks) / \ v v [AWS Bedrock] [S3 Vectors] - Embedding Model - Native Vector Search - Q&A LLM - Bundled Text & Metadata ```
- **Feature Release Date**: Amazon S3 Vectors launched on July 15, 2025, and was evaluated in the `us-east-1` region. - **Native AWS Ecosystem**: Deployed cleanly using AWS CloudFormation and monitored out of the box using CloudWatch metrics. - **Embedded Chunk Metadata**: S3 Vectors returns matched source text chunks alongside vector similarity scores, eliminating secondary data retrieval queries. - **Frictionless Migration**: Swapping out DynamoDB for S3 Vectors required only localized updates to Lambda handlers and IAM role policies, showcasing modular system design.
---
[15:38](https://www.youtube.com/watch?v=vv3ydGd9Anc&t=938s) System Telemetry, Evals, and Mapping Enterprise Design Principles
Following the migration to S3 Vectors, CloudWatch metrics demonstrated sweeping improvements: API latency dropped sharply, Lambda execution durations were slashed, error rates fell, and overall throughput climbed significantly. Concurrently, offline evals showed marked improvements in end-to-end response accuracy and retrieval precision, confirming that native vector operations delivered higher-quality context to the underlying Bedrock language models.
``` +---------------------+------------------------+---------------------------------------+ | Design Principle | AWS / Tech Mapping | Architectural Implementation | +---------------------+------------------------+---------------------------------------+ | Modularity | AWS Lambda | Independent functions per endpoint | | Scalability | Serverless primitives | Exponential automated scaling | | Reliability | AWS Managed Services | Lambda auto-retries, S3 redundancy | | Security | IAM & Encryption | Least privilege, S3 rest/transit enc. | | Flexibility | AWS Bedrock | Swappable embedding and text models | | Maintainability | CloudFormation & CLI | Infrastructure as Code (IaC) | | Testability | Unit Tests | Isolated component and Lambda testing | | Reusability | Lambda Layers | Shared code layers reusable for RAG | | Observability | CloudWatch & LangSmith | Trace calls, dashboards, metric logs | | Evaluation | TensorBoard & Evals | Accuracy measurement & visualization | +---------------------+------------------------+---------------------------------------+ ```
To evaluate the broader maturity of the build, the speaker mapped foundational enterprise system design principles to concrete technologies and business impacts across the stack. Reliability was anchored by managed auto-retries in Lambda and continuous redundancy in S3. Security followed the principle of least privilege using granular IAM execution roles for Bedrock and S3 access, alongside end-to-end encryption for data at rest and in transit.
Operational observability was achieved by combining automated CloudWatch dashboards with LangSmith (or Langfuse/LangChain tracing) to trace granular model execution paths and monitor system health. On the evaluation side, TensorBoard was utilized alongside custom eval scripts to visualize performance trends and measure answer accuracy across continuous development cycles.
- **CloudWatch Telemetry**: Tracked Lambda runtimes, invocation error rates, request throughput, and latency drops after vector migration. - **Observability Stack**: Integrated tracing to capture LLM chains alongside automated CloudWatch dashboards for DynamoDB, Lambda, and S3. - **Evaluation Tooling**: Used TensorBoard to graph accuracy trends and evaluate retrieval performance across iterations. - **Infrastructure as Code**: Managed complete environment provisioning through AWS CloudFormation and automated updates via the AWS CLI.
---
[18:50](https://www.youtube.com/watch?v=vv3ydGd9Anc&t=1130s) AI Risk Mitigation, Sub-Second Performance, and AI-Assisted Tooling
Operating enterprise AI systems requires proactively mitigating specific generative AI risks. To eliminate hallucinations, the application strictly adheres to the RAG pattern, grounding every generation within retrieved context and injecting the source chunk metadata into the final API payload for end-to-end source attribution. Semantic drift and context gaps are resolved through vector similarity matching inside S3 Vectors. To protect user privacy and corporate data, network paths are secured via VPC isolation, least-privilege IAM controls, and multi-layered encryption at rest and in transit.
Bias is minimized by maintaining strict document boundary isolation, ensuring searches pull only from the specific book or codebase explicitly selected by the user. On the safety front, custom content filtering implemented across AWS Bedrock and Lambda filters out profanity, inappropriate language, and sensitive data leaks. Optimizing these layers brought end-to-end query response times down from the initial 3-second crawl to roughly 150 milliseconds. When audited against the AWS Well-Architected Framework whitepaper, the architecture earned a rigorous score of 54 out of 60.
Reflecting on velocity, the speaker credited an AI-assisted development workflow powered by tools like Cursor, Eraser.io (for architectural diagrams), and Google Gemini. Cursor's inline editing, agentic workflows, and codebase indexing allowed a solo engineer to work at the pace of an entire team—building an enterprise-grade, highly secure AI platform for "less than a cup of coffee a day" that scales to thousands of concurrent users in seconds. Just as the speaker begins outlining final takeaways on clearly defining the problem space, the session moderator steps in to close the presentation for the next incoming speaker.
- **150ms Query Latency**: Native vector operations and optimized serverless compute reduced total query execution time from ~3,000ms to 150ms. - **Hallucination & Bias Safeguards**: RAG architecture forces grounded responses with full chunk attribution, while strict document-level isolation prevents cross-tenant data leakage. - **Enterprise Safety**: Bedrock content filters and Lambda validation guardrails actively screen out profanity, adult language, and sensitive data. - **AWS Well-Architected Review**: Scored 54 out of 60 against AWS Well-Architected Framework best practices. - **Solo Developer Toolkit**: Leveraged Cursor, Eraser.io, and Google Gemini to dramatically accelerate architecture, coding, and debugging cycles. - **Session Conclusion**: "I'm so sorry to have to cut you off. Unfortunately we have another session starting at 11:30. So let's give her a round of applause."
## Notable quotes > [00:04](https://www.youtube.com/watch?v=vv3ydGd9Anc&t=4s) Can a solo developer build enterprise-grade AI systems? — Soujanya Vullam
> [00:04](https://www.youtube.com/watch?v=vv3ydGd9Anc&t=4s) Observability allows engineers to inspect the internal state of an application via generated telemetry—logs, metrics, and distributed traces—to understand how the large language model makes its decisions, evaluate performance trends over time, and ensure stringent compliance with security protocols. — Soujanya Vullam
> [03:21](https://www.youtube.com/watch?v=vv3ydGd9Anc&t=201s) Because DynamoDB is a traditional NoSQL database lacking native vector indexing and vector similarity search primitives, the compute-heavy operations—namely calculating cosine similarity and sorting/ranking candidates against query vectors—had to be processed entirely inside the Lambda functions. — Soujanya Vullam
> [07:10](https://www.youtube.com/watch?v=vv3ydGd9Anc&t=430s) Designing an enterprise system as a solo developer demands rigorous architectural choices early on to avoid runaway infrastructure maintenance and unmanageable operational overhead. — Soujanya Vullam
> [07:10](https://www.youtube.com/watch?v=vv3ydGd9Anc&t=430s) Choosing AWS Bedrock provided access to foundation models for both natural language response generation and embedding synthesis, packaged as an auto-scaling, pay-per-use managed service with multi-nine availability. — Soujanya Vullam
> [09:56](https://www.youtube.com/watch?v=vv3ydGd9Anc&t=596s) Because DynamoDB stored the vector arrays merely as raw attributes, the Lambda compute layer had to retrieve the records, parse the numerical arrays, execute cosine similarity math across every record, and sort the ranked results before constructing the model context. — Soujanya Vullam
> [09:56](https://www.youtube.com/watch?v=vv3ydGd9Anc&t=596s) Standard relational and NoSQL databases lack indexing strategies capable of executing approximate nearest neighbor (ANN) searches across millions of high-dimensional vectors at sub-second speeds. — Soujanya Vullam
> [12:45](https://www.youtube.com/watch?v=vv3ydGd9Anc&t=765s) Because vectors are stored alongside their raw chunk text and metadata directly within the database engine, an ANN similarity query returns the matched text chunks directly in the search response payload. — Soujanya Vullam
> [12:45](https://www.youtube.com/watch?v=vv3ydGd9Anc&t=765s) The migration required no architectural overhaul: the system boundaries remained intact, and changes were confined to the query Lambda functions and IAM execution roles to grant access to the S3 Vectors API. — Soujanya Vullam
> [18:50](https://www.youtube.com/watch?v=vv3ydGd9Anc&t=1130s) To eliminate hallucinations, the application strictly adheres to the RAG pattern, grounding every generation within retrieved context and injecting the source chunk metadata into the final API payload for end-to-end source attribution. — Soujanya Vullam
> [18:50](https://www.youtube.com/watch?v=vv3ydGd9Anc&t=1130s) less than a cup of coffee a day — Soujanya Vullam
> [18:50](https://www.youtube.com/watch?v=vv3ydGd9Anc&t=1130s) I'm so sorry to have to cut you off. Unfortunately we have another session starting at 11:30. So let's give her a round of applause. — Session Moderator
## Mentioned Soujanya Vullam, Yahoo, Ai4, Epic Q&A, AWS, AWS Bedrock, Amazon Route 53, Amazon CloudFront, Amazon S3, Amazon Cognito, Amazon API Gateway, AWS Lambda, Amazon DynamoDB, Amazon S3 Vectors, AWS CloudFormation, Amazon CloudWatch, AWS Well-Architected Framework, LangSmith, Langfuse, LangChain, TensorBoard, Cursor, Eraser.io, Google Gemini, Perplexity, ChatGPT, React
## Video description Soujanya Vullam, Software Development Engineer II, Yahoo
Abstracts
Can a solo developer build enterprise-grade AI systems? In this session, I’ll share how I independently designed and deployed a secure, scalable AI Q&A platform using LLMs, AWS Bedrock, and AWS serverless architecture. The talk will illustrate real-world techniques to accelerate developer velocity, reduce infrastructure costs through serverless system design, and co-develop with AI tools like Cursor, Eraser.io, Perplexity, and ChatGPT. You’ll walk away with actionable strategies for turning lightweight prototypes into production-ready applications that scale. Join me to explore what’s possible when generative AI and cloud-native architecture come together.
[Source](https://www.youtube.com/watch?v=vv3ydGd9Anc)