AWS Builder Center

Amazon Bedrock Managed Knowledge Base: Setup Traps and Gotchas

A field-tested guide to Amazon Bedrock Managed Knowledge Base: the mental model, the setup traps that fail silently, and a compliance checklist for regulated RAG workloads.

GenAI Developer @nCino
I recently built a retrieval-augmented generation (RAG) layer on Amazon Bedrock and lost more time than I'd like to two things: overloaded names and behavior that isn't obvious from the docs. This is the write-up I wish I'd had on day one; the mental model, the setup traps, what you can actually control, and the questions to ask if you're in a regulated environment.

First, let's untangle the names

Two naming collisions cause most of the confusion:
"Amazon Bedrock Knowledge Bases" is an orchestration layer, not a database. It runs the ingestion pipeline (connect a data source → parse → chunk → embed → store) and exposes the  Retrieve  /  RetrieveAndGenerate  APIs. It does not store vectors itself meaning that there's always a vector store underneath.
The vector store underneath is a separate thing. Often that's Amazon OpenSearch Serverless (AOSS), which is a vector database plus a k-NN/keyword query engine. It stores already-embedded vectors and returns nearest neighbors. It does not chunk or embed but Bedrock does that.
Now the two collisions:
  • "Bedrock Knowledge Base" comes in two flavors. Customer-managed (bring your own vector store e.g. AOSS, Aurora, and others) vs Bedrock Managed Knowledge Base (BMKB), where AWS manages the vector store for you. Same API surface, different ownership of the storage layer.
  • AOSS has two generations. Classic keeps a standing compute floor (roughly a 2-OCU minimum that bills even when idle). The newer generation adds scale-to-zero after an idle period. This axis only matters for the customer-managed flavor since BMKB hides the store entirely.
Layer
Who owns it
What it does
Connectors, parsing, chunking, embedding, Retrieve
Bedrock KB
the RAG pipeline + query orchestration
Vector store (store + k-NN/keyword)
AOSS (customer-managed) or AWS (BMKB)
holds vectors, returns nearest neighbors
Keep that split in your head. Chunking, parser, and embedding model are all Bedrock KB settings, not vector-store settings. It clears up a surprising amount.

Setup traps that cost me time

Your CLI may be too old to even create one. BMKB's  create-knowledge-base  uses a  MANAGED  knowledge-base type that older AWS CLI builds don't recognize (you'll get "Unknown parameter ... managedKnowledgeBaseConfiguration"). Use a current AWS SDK instead of fighting the CLI. Three calls get you running:
import boto3
bedrock_agent = boto3.client("bedrock-agent")

kb = bedrock_agent.create_knowledge_base(
name="my-managed-kb",
roleArn="arn:aws:iam::<account>:role/<kb-service-role>",
knowledgeBaseConfiguration={
"type": "MANAGED",
"managedKnowledgeBaseConfiguration": {"embeddingModelType": "MANAGED"},
},
)
# then create_data_source(...) and start_ingestion_job(...)
The data source type is its own enum. For BMKB it's  MANAGED_KNOWLEDGE_BASE_CONNECTOR , wrapping  connectorParameters  (S3, SharePoint, etc.), not the plain  S3  shape you may know from customer-managed KBs.
 Retrieve  uses a different config block. This one is easy to miss because the error is explicit but only shows up at query time:
ValidationException: vectorSearchConfiguration is not supported for managed
knowledge bases. Use managedSearchConfiguration instead.
So on BMKB it's  retrievalConfiguration: { managedSearchConfiguration: { numberOfResults: 5 } } , not  vectorSearchConfiguration .
Ingestion warms up before it does anything. On my first runs the job sat at  IN_PROGRESS  with zero documents scanned for around two minutes before it started moving. That's normal; don't kill it.

Metadata and multitenancy (and the sidecar trap)

Multitenancy on a single knowledge base works the way you'd hope: tag each document with a  tenantid  attribute, then filter at query time so a tenant only ever sees its own data. With an S3 source you attach metadata via a sidecar file named  <document>.metadata.json  next to the document:
{ "metadataAttributes": { "tenantid": { "value": { "type": "STRING", "stringValue": "alpha" } } } }
Then filter on retrieval:
{ "managedSearchConfiguration": { "numberOfResults": 5,
"filter": { "equals": { "key": "tenantid", "value": "alpha" } } } }
In my testing this isolated cleanly. A tenant filter returned only that tenant's documents, and an unfiltered query returned everything.
The trap: if you set  metadataFilesPrefix  on the S3 connector, sidecar auto-detection silently stops working. The symptom is  numberOfMetadataDocumentsScanned: 0  in the ingestion stats, and your filter then matches nothing because the attribute never attached. The fix is counter-intuitive: omit  metadataFilesPrefix  and let the connector pick up the  .metadata.json  files sitting next to your documents.

What you can and can't control

This is the part that matters most if you have opinions about models or chunking. On the managed flavor:
Stage
Managed (BMKB)
Customer-managed
Embedding model
Pinnable (custom = any Bedrock embedding model)
Pinnable
Reranker model
Pinnable (custom = a Bedrock rerank model)
Pinnable
Chunking
default / fixed-size / none (no semantic)
fixed / semantic / hierarchical / none
Parsing
smart parser only (FM parser & data automation not selectable)
default / foundation-model parser / Bedrock Data Automation
The headline: on BMKB you can pin your embedding model and your reranker model to specific Bedrock models (those are not black boxes). The one thing you can't choose is the parser. The managed smart parser handles multimodal content through a built-in pipeline; for plain text no model is involved, and for complex documents it uses Bedrock's managed data-automation path, where the underlying model isn't something you select or see. If you need to pin the parser model, that's a customer-managed capability (the foundation-model parser lets you set the model ARN).

The cost shape

The pricing models are genuinely different, and it's the standing floor (note: not per-query cost) that dominates.
  • Customer-managed on AOSS Classic pays a vector-store floor around the clock (roughly a 2-OCU minimum, on the order of a few hundred dollars a month) even with zero traffic.
  • BMKB is usage-based: you pay for stored data plus retrievals, with no OCU floor. The multimodal parser, managed embedding, and managed reranker are included.
For spiky or low-volume workloads that difference is large: a managed, no-floor store can come out dramatically cheaper than a standing OCU floor, while a 24/7-saturated workload narrows the gap. Model it against your actual traffic shape, and confirm current rates on the Bedrock pricing page.

A compliance checklist for regulated workloads

If you operate under contractual commitments about which models process customer data and where, the questions to answer are narrower than "is a managed service auditable?" Here's how it broke down for me:
  • Which models touch the data? On BMKB, embedding and reranker are pinnable, so put approved models there. The only opaque stage is the parser and only for non-plain-text documents (plain text uses no model). If your contract requires attesting the specific parser model, go customer-managed with the foundation-model parser and set the model ARN. If it only requires excluding certain providers, read on.
  • Does data leave the region? The managed data-automation path uses cross-region inference, but geographic inference profiles keep processing within the geography the data originates in (EU stays in EU, and so on) not global. That satisfies geography-level residency; it does not satisfy a strict single-region requirement.
  • Can third-party model providers see the data? No. Bedrock deploys each provider's model into a service-operated account that the provider has no access to, so providers don't see your prompts, completions, or logs.
  • Is the data used for training? AWS states that Bedrock does not store your inputs/outputs, share them with third-party model providers, or use them to train models.
Net: for a "keep it in-geography and don't route it to disallowed providers" posture, a managed knowledge base holds up by you pin the embedding and reranker, and the residual question is just the parser model for complex documents. For "single region only" or "attest the exact model," reach for customer-managed.

When to pick which?

  • Managed (BMKB): fastest to stand up, no vector store to run, usage-based cost, native connectors, and it plugs into agent tooling. A good default for most RAG workloads.
  • Customer-managed: when you need a specific vector database, semantic or hierarchical chunking, or the ability to pin and audit the parser model.
None of this is exotic once the layers are clear, but the names actively work against you, and a couple of the behaviors (the Retrieve config, the metadata sidecar) fail quietly. Hopefully this saves you the afternoon it cost me.
Rates, region behavior, and model availability change, so please verify the specifics against current AWS documentation for your regions before you commit.
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article