product updateAmazon Web Services

AWS Details Reference Architecture for Multi-Tenant Document Chat on Amazon Bedrock Knowledge Bases

TL;DR

AWS has published a reference architecture showing how to build multi-tenant agentic document chat applications using Amazon Bedrock Managed Knowledge Base. The design handles per-user document isolation, asynchronous ingestion up to 50 MB, and agentic multi-hop retrieval with citations, offloading infrastructure work from development teams.

3 min read
0

AWS has published a reference architecture for building multi-tenant agentic document chat applications on Amazon Bedrock Managed Knowledge Base, addressing a common enterprise pattern: users upload documents and immediately ask grounded questions against them, with strict isolation between tenants.

The architecture, detailed in an AWS Machine Learning blog post, targets a specific engineering problem. Building document chat with a conversational interface is straightforward, but the retrieval system behind it is not. Each tenant's documents must stay isolated from every other tenant's, and that isolation must be enforced from a verified identity rather than a value supplied by the client. Agentic retrieval — where a system decomposes a question into sub-queries and runs multiple retrieval hops — compounds this problem, since every hop must carry the tenant filter or isolation breaks.

What Amazon Bedrock Managed Knowledge Base handles

According to AWS, the managed service takes over ingestion, storage, embedding, and ranking, eliminating the need for teams to provision or monitor a vector and full-text search infrastructure. It includes built-in agentic retrieval using iterative planning and multi-hop retrievals, and it enforces access permissions on every retrieval hop. Direct ingestion through a custom connector allows documents to become retrievable within seconds, AWS states.

Architecture components

The reference solution combines several AWS services:

  • Amazon Bedrock Managed Knowledge Base — crawls, parses, stores, and retrieves multimodal content including text, vectors, metadata, and structured files like CSV and Excel
  • Amazon API Gateway and AWS Lambda — expose upload, status, and chat endpoints
  • Amazon Cognito — authenticates users and supplies the verified identity used for per-user isolation
  • Amazon SQS — decouples uploads from ingestion, absorbing bursts and routing repeated failures to a dead-letter queue
  • Amazon DynamoDB — tracks per-document indexing status
  • Amazon S3 — stages files exceeding the inline size limit and hosts the frontend behind CloudFront

How the workflow operates

When a user uploads a document, Amazon API Gateway validates the JSON Web Token (JWT) from Amazon Cognito, and the application derives user identity server-side rather than trusting a client-supplied value. Files up to 6 MB are sent inline in the API request; larger files, up to 50 MB for text, are staged to S3 and referenced by URI. A worker Lambda function tags each document with a user_id metadata attribute from the caller's Cognito sub value, then calls the IngestKnowledgeBaseDocuments API, which chunks, embeds, and indexes the document asynchronously. Document status moves through received, processing, and ready states, tracked in DynamoDB and polled by the frontend.

For retrieval, the application calls the AgenticRetrieveStream API with an explicit equals filter on user_id, built server-side from the verified JWT. The knowledge base returns matching passages, a foundation model generates a cited response, and the application streams it back to the user.

AWS notes that direct ingestion via the custom connector, rather than the S3 connector, is deliberate: the S3 connector is designed for scheduled bulk syncs that could overwrite or remove documents a user just added. Direct ingestion through IngestKnowledgeBaseDocuments persists documents until explicitly deleted and lets developers assign their own document IDs. The knowledge base retains a copy of each original file, retrievable via the GetDocumentContent API, removing the need for a separate document store.

AWS provides an accompanying code repository so developers can deploy the solution directly.

What this means

This is a product/architecture guide, not a new model release. The value for engineering teams is the removal of undifferentiated infrastructure work — vector indexing, multi-hop retrieval orchestration, and tenant isolation enforcement — that would otherwise need to be built and secured in-house. The critical design detail is that isolation is enforced via server-derived identity from a validated JWT on every retrieval hop, closing a common security gap in agentic RAG systems where client-supplied tenant IDs could be spoofed. Teams building multi-tenant SaaS products with document chat features on AWS now have a documented, reusable pattern rather than needing to design tenant isolation for agentic retrieval from scratch.

Related Articles

product update

AWS Launches Framework-Agnostic Agent Evaluation via OpenTelemetry in Bedrock AgentCore

Amazon Bedrock AgentCore Evaluations now scores AI agents regardless of the framework they're built on, by reading OpenTelemetry and OpenInference instrumentation instead of requiring a specific SDK. The service automatically decodes traces from six named frameworks and extends coverage to any library following the same telemetry conventions.

product update

OpenAI Quietly Rolls Out Outcome-Based Pricing, Charging Some Customers Only When Tasks Succeed

OpenAI has quietly begun offering some large customers a pay-per-outcome model, charging only when its AI successfully completes tasks such as customer support requests, according to The Information. The shift joins a broader industry move away from flat subscriptions toward usage- and results-based billing, led by startups like Sierra, Fin, and Cognition.

product update

Salesforce and Anthropic Launch 'Claudeforce' Plugin With 37 Sales Skills for Claude

Salesforce and Anthropic unveiled Claudeforce, a plugin with 37 pre-built sales skills that lets Claude access Salesforce data and take actions like composing emails and updating records. The move comes as Salesforce shares have fallen 22% in 2026 amid investor concerns that AI could replace SaaS platforms.

product update

OpenAI Launches Admin Plugin for ChatGPT Work and Codex Workspace Management

OpenAI has released the Admin plugin for ChatGPT Work and Codex, letting workspace administrators manage users, permissions, and usage limits through conversational commands. The plugin is available now in the ChatGPT Work Plugins directory.

Comments

Loading...