dataonaws
— Stack · AI

RAG on AWS with Bedrock Knowledge Bases

The RAG building block on AWS. A knowledge base ingests your documents, parses, chunks and embeds them, then returns the right passages to your LLM or agent. Bedrock can run the whole pipeline for you, or you run it on the vector store you choose.

How it fits

Documents in, the right passages out. Two ways to run the store.

SOURCESBEDROCK KNOWLEDGE BASECUSTOMER-MANAGEDMANAGED KB ONLYYOUR APPLICATIONAmazon S3files + metadataSharePointConfluence, OneDriveGoogle Driveweb crawlerCustompush via APIParseFM, BDA or smartChunkfixed at creationEmbedmanaged or BedrockYour vector storeyou provision, you payOpenSearchAurora PostgreSQLS3 VectorsNeptune AnalyticsPinecone, Redis, MongoDBManaged storeBedrock runs itRetrievehybrid + filtersRerankmanaged or BedrockAgentic retrievemulti-step searchAgentCore GatewayKB as an MCP toolYour LLMConverse, citationsApp or agentyour codeone sync = one ingestion job · ingestion logs to CloudWatch, S3 or Firehose · sources and KB in the same Region

Customer-managed vector stores: Amazon OpenSearch (Serverless or managed clusters), Aurora PostgreSQL, S3 Vectors, Neptune Analytics, Pinecone, Redis Enterprise Cloud, MongoDB Atlas. Managed KB: seven native connectors (S3, SharePoint, Confluence, Web Crawler, Google Drive, OneDrive, custom), built-in parsing, embedding and reranking, plus Retrieve, agentic retrieval and AgentCore Gateway. Customer-managed: S3 and custom connectors. Feature and model support differ by Region.

Three ways to query

Get passages, get an answer, or let it search in steps.

Passages

Retrieve

Retrieve → your Converse call

Returns chunks, metadata and scores. You generate with your own LLM call, so you control citations, refusals when no source answers, and guardrails.

Answer

RetrieveAndGenerate

RetrieveAndGenerate

Retrieves and generates in one call with the model you pick. Faster to start; the prompt template and the answer format are less yours to shape.

Multi-step

Agentic retrieval

AgenticRetrieveStream

Managed KB only. Splits the question, searches, checks whether the context is enough, searches again, then hands a synthesised context to your LLM.

The three choices that matter

Three decisions set the quality and the bill.

01

Managed or customer-managed

Managed bundles the store, parsing, embedding, reranking and connectors. Customer-managed lets you choose the store (OpenSearch, Aurora PostgreSQL, S3 Vectors, Neptune Analytics, Pinecone, Redis, MongoDB Atlas), the parser and the chunking.

02

How documents are parsed and cut

Parsing decides what happens to tables, columns and scans. Chunking cannot change once the data source exists; hierarchical chunking matches on small chunks and returns the larger parent for context.

03

How the right passage wins

A metadata file per document (product, version, status) lets you filter at query time. A reranker rescores the chunks so fewer reach the LLM. Agentic retrieval costs more per call; route only multi-step questions to it.

Tag values describe mechanisms, not measured figures.

What you pay

A knowledge base bill, two shapes.

Managed storage
$5 per GB-month
Of raw source data; parsing, managed embedding and managed reranking at no extra cost
+
Managed queries
$1 per 1,000
Retrieve calls; agentic retrieval $4 per 1,000 plus the retrieves it runs
+
Customer-managed store
billed even idle
Your vector database, at its own rates; an OpenSearch Serverless collection bills OCU-hours with no traffic
+
Customer-managed tokens
per ingestion
Embedding and FM parser tokens on each sync, plus reranker calls at query time
What we see in production
A RAG demo shipped without an evaluation set.Collect 30 to 50 real questions with the expected document and answer, and replay them on every change.
Near-identical documents, the wrong one retrieved.Add type, version and status as metadata and filter on them before tuning the embedding.
A vector store billed every month for a pilot nobody queries.Customer-managed stores cost money at zero traffic; Managed KB bills per GB and per call.
Source bucket in another Region than the knowledge base.Ingestion fails without an alert by default; keep both in one Region and alarm on failed ingestion jobs.
Chunking and embedding chosen once, never tested.Both are fixed at creation; compare two data sources on the evaluation set before going live.
No reranker available in the knowledge base's Region.Check parser, embedding and reranker support for your Region before you commit to it.
How we help

End-to-end agentic AI use cases

From business need to production, customer-facing included, with evaluation and ops to match.

Read the approach →
PDF · coming soon

The one-page RAG on AWS with Bedrock Knowledge Bases field guide.

Best practices, cost traps and performance checks, in the order you should run them. Printable, no fluff.

One email when the PDF is ready. Nothing else unless you tick the box.