Amazon Bedrock Knowledge Bases: how they work and what they cost
A Bedrock knowledge base is AWS's managed RAG: it reads your documents from S3, SharePoint or Confluence, splits and embeds them, stores the index and answers Retrieve calls. Managed or customer-managed, what each of the 4 query APIs does, how metadata filters work, and a worked monthly bill.
Tecyfy · Published · 8 min read

An Amazon Bedrock knowledge base is AWS's managed retrieval-augmented generationRAGA way to answer from your own documents. A search finds the passages that match the question, and they are added to the prompt before the model writes.: it reads your documents, splits and embeds them, keeps a search index and returns the passages that answer a question. A managed knowledge base costs $5 per GB of raw data a month plus $1 per 1,000 searches, with parsing, embeddings and reranking included; the model that writes the answer is billed on top.
It saves you building the pipeline in our RAG app guide by hand. Whether it is the right choice depends on 3 things: where your documents live, how much control you want over the index, and how many questions it will answer.
How a knowledge base works
- Connect a source. S3, SharePoint, Confluence, Google Drive, OneDrive, a web crawler, or a custom source you push documents into.
- Sync. Bedrock parses each file (text, PDFs, tables, images), splits it into chunks, about 300 tokens each by default on sentence boundaries, embeds each chunk and writes it to the index. Later syncs are incremental: only added, changed or deleted files are processed.
- Query. A question is embedded, the closest chunks are found and reranked, and the best 5 (by default) come back with their source and metadata.
The sync is not automatic. If a policy changes in SharePoint and nobody runs a sync, the knowledge base keeps answering from the old one. Start a sync from your upload pipeline or on a schedule.
Managed or customer-managed
There are 2 kinds, and AWS recommends the first:
| Managed | Customer-managed | |
|---|---|---|
| Vector store | Run by Bedrock, scales itself | Yours: OpenSearch Serverless, Aurora, Neptune, an S3 vector bucket and others |
| Embedding model | Built in, no charge; or any Bedrock model with 1,024 float32 dimensions | Any Bedrock embedding model, billed per token |
| Reranking | Built in, no charge | Pick a reranker, billed per query |
| Connectors | 7 (S3, SharePoint, Confluence, web crawler, Google Drive, OneDrive, custom) | S3 and custom |
| Agentic retrieval | Yes | No |
| Permission-aware results | Yes | No |
| Knowledge base fee | $5 per GB a month, $1 per 1,000 searches | None; you pay the store and the models |
Choose customer-managed when you already run a Vector DatabaseVector DatabaseA database built to store embeddings and quickly find the ones closest to a query, which is how AI apps search by meaning. you want to keep, need Hybrid SearchHybrid SearchRunning a keyword search (usually BM25) and a vector search for the same query and merging the 2 ranked lists, so exact terms like a product code and loose wording like "money back" are both found. tuned your way, or want to read the index directly. Choose managed for everything else: no store to size, no embedding bill, and the connectors your company documents already sit behind.
The 4 ways to ask
- Retrieve returns the matching chunks with scores and source locations. You build the prompt and call the model yourself. Use it when you want control over the prompt, or when the answer goes to an agent.
- RetrieveAndGenerate retrieves, passes the chunks to the model you name and returns an answer with citations. The quickest way to a working assistant.
- Agentic retrieval (managed only) lets a model break a hard question into several searches and combine them. Better on "compare our 2025 and 2026 travel policies"; costs more per question.
- GenerateQuery turns a question into a query for a structured data store, such as a data warehouse, when the knowledge base is connected to one.
One thing to know: GuardrailsGuardrailChecks placed around a model that stop or change what goes in and what comes out, such as a filter on user messages or an approval step before an agent acts. check the question and the generated answer, not the retrieved passages. If your documents could contain instructions planted by someone else, a classic Prompt InjectionPrompt InjectionAn attack that hides instructions in text a model reads, such as a web page, an email or a file, so the model follows the attacker instead of you. route, treat them as untrusted text.
Metadata filters
Put a <file>.metadata.json file beside each document:
{ "metadataAttributes": { "department": "hr", "year": 2026, "region": ["eu", "uk"] } }
Then filter at query time, so an HR question only searches HR documents from 2026:
"filter": { "andAll": [
{ "equals": { "key": "department", "value": "hr" } },
{ "greaterThanOrEquals": { "key": "year", "value": 2026 } },
{ "listContains": { "key": "region", "value": "eu" } }
] }
Filters are the cheapest accuracy gain there is: fewer wrong candidates means fewer wrong answers. startsWith and stringContains do not work on managed knowledge bases or S3 vector buckets, so store a value you can match exactly.
Managed knowledge bases can also filter by the user's own permissions in SharePoint, OneDrive, Google Drive and Confluence, matched by email address. AWS says plainly this is not an authorization mechanism: it narrows results; your application still decides who may ask.
A worked month
A help desk over 20 GB of policies and manuals, answering 5,000 questions a day (150,000 a month), on a managed knowledge base with RetrieveAndGenerate:
- Index: 20 GB × $5 = $100
- Searches: 150,000 ÷ 1,000 × $1 = $150
- The answer on Claude Sonnet 5.5, 2,000 tokens in (5 chunks plus the question and instructions) and 300 out: 150,000 × (2,000 × $2 + 300 × $10) ÷ 1 million = $1,050
$1,300 a month, and the model is 80% of it. The same answers on Claude Haiku 5.5 cost about $53, so the month drops to about $300. Switch to agentic retrieval at 3 searches a question and the knowledge base part goes from $250 to $1,150: keep it for the questions that need it.
150,000 questions a month over 20 GB cost about $250 before the model writes any answer, $1.67 per 1,000 questions. Retrieval is the larger part: cache frequent answers or cut repeat searches.
Managed knowledge base prices from AWS's Bedrock pricing page, 30 days a month. Parsing, embedding and reranking are included. The model that writes the answer is billed per token on top.
What to do
- Start with a managed knowledge base and the default chunking; change chunk size only when tests show wrong passages, as in our chunk size test.
- Add metadata from day one. Adding it later means re-syncing everything.
- Sync from your pipeline, not by hand.
- Measure with a small set of real questions and expected sources before you tune anything.
- Spend on the model, not the search: the search is a dollar per thousand; the answer costs far more. Our Bedrock pricing guide covers how to cut the model bill, and the embedding cost calculator prices a customer-managed index.
Questions
- What is an Amazon Bedrock knowledge base?
- A managed retrieval-augmented generation (RAG) service. You point it at your documents, it parses, chunks and embeds them into a vector index, keeps the index in sync and answers queries with the most relevant chunks, either on their own (Retrieve) or passed to a model that writes a cited answer (RetrieveAndGenerate).
- How much do Amazon Bedrock Knowledge Bases cost?
- A managed knowledge base costs $5 per GB of raw data a month for its index and $1 per 1,000 Retrieve calls; agentic retrieval costs $4 per 1,000 calls plus $1 per 1,000 of the searches it runs (AWS's price page on 22 October 2026). Parsing, embeddings and reranking are included. The model that writes the answer is billed per token on top. A customer-managed knowledge base has no knowledge base fee, but you pay for the embedding model and your own vector store.
- What is the difference between a managed and a customer-managed knowledge base?
- In a managed knowledge base Bedrock runs the store, the embedding model and the reranker, and you get 7 native connectors, agentic retrieval and access-control-aware retrieval. In a customer-managed one you choose and run the vector store (OpenSearch Serverless, Aurora, an S3 vector bucket and others), pick the embedding model and connect only S3 or a custom source. AWS recommends managed unless you need control of the vector database.
- How do I filter a knowledge base query by metadata?
- Put a <file>.metadata.json file next to each document with a metadataAttributes object (for example department and year), sync, then pass a filter in the retrieval configuration with operators such as equals, in, greaterThan and listContains, combined with andAll or orAll. startsWith and stringContains are not supported on managed knowledge bases or S3 vector buckets.
- Does a Bedrock knowledge base update when my documents change?
- Only when you sync. Each sync is incremental, processing the documents added, changed or deleted since the last one, so schedule a sync (or start one from your upload pipeline) whenever the source changes.
Sources
Where each fact comes from
- 1Amazon Bedrock Pricing
- 2Build a managed knowledge base
- 3How content chunking works for knowledge bases
- 4Sync a data source
- 5Include metadata in a data source to improve knowledge base query
- 6Configure and customize queries and response generation
- 7Access Control Lists awareness enablement
- 8Retrieving information from data sources using Amazon Bedrock Knowledge Bases
- 9Query a knowledge base and retrieve data