Skip to content
Kestron AI

Bedrock & RAG

Bedrock Knowledge Bases: Setup, Cost and Limits

By Adarsh Singh ·

Key takeaways

  • Amazon Bedrock Knowledge Bases is a managed RAG service: it splits your documents into chunks, turns them into embeddings, stores them in a vector database and retrieves the right passages when a user asks a question.
  • There is no separate fee for Knowledge Bases itself. You pay for embeddings, the vector store and the model that writes the answer.
  • The biggest surprise on the bill is usually the vector store, not the model. OpenSearch Serverless has a minimum monthly cost even when nobody uses it.
  • It is the fastest way to ship RAG on AWS. For strict multi-tenant isolation, custom retrieval logic or very high scale, plan your design before you commit.

What are Amazon Bedrock Knowledge Bases?

Amazon Bedrock Knowledge Bases lets you connect a foundation model to your own data without building the retrieval pipeline yourself. You point it at a data source, choose an embedding model and a vector store, and Bedrock handles ingestion, chunking, embedding and search.

When a user asks a question, your application calls the Knowledge Base. It finds the most relevant chunks of your content and either returns them to you or passes them to a model that writes an answer with citations.

This pattern is called RAG (retrieval-augmented generation). It is how most SaaS teams add “chat with your docs”, support assistants and internal search to their product.

How Bedrock Knowledge Bases work

A Knowledge Base has three parts:

  1. Data source. Where your content lives. Common options are Amazon S3, a web crawler, Confluence, SharePoint and Salesforce.
  2. Embedding model. Turns each chunk of text into a vector. Amazon Titan Text Embeddings V2 and Cohere Embed are the usual choices.
  3. Vector store. Where the vectors are stored and searched. Options include Amazon OpenSearch Serverless, Aurora PostgreSQL with pgvector, Amazon Neptune Analytics, Amazon S3 Vectors (in supported regions), Pinecone, Redis Enterprise Cloud and MongoDB Atlas.

You then use one of two APIs:

  • Retrieve returns the most relevant chunks. Your code decides what to do with them. Use this when you want control over the prompt.
  • RetrieveAndGenerate retrieves the chunks and asks a model to write the answer in one call. Use this for a quick first version.

How to set up a Knowledge Base (step by step)

  1. Prepare your content. Put documents in an S3 bucket. Remove duplicates and outdated versions first. Bad content in means bad answers out.
  2. Create the Knowledge Base. In the Bedrock console, choose your data source, embedding model and vector store. “Quick create” builds an OpenSearch Serverless collection for you.
  3. Choose a chunking strategy. Default chunking works for simple text. Use hierarchical or semantic chunking for long technical documents, and fixed-size chunks when you need predictable token counts.
  4. Choose a parser. For PDFs with tables, charts or scanned pages, use the advanced parsing option instead of the default text parser.
  5. Add metadata. Attach fields such as tenant_id, document_type or language to each file. You will use them to filter results later.
  6. Run a sync. Bedrock ingests the documents. Later syncs only process changed files.
  7. Test with real questions. Use 20 to 50 questions your users actually ask. Check which chunks come back, not just the final answer.
  8. Connect your app. Call Retrieve or RetrieveAndGenerate from your backend, with IAM permissions scoped to that one Knowledge Base.

Define the whole setup in Terraform or CloudFormation from day one. Console-built Knowledge Bases are hard to reproduce in staging and production.

How much do Bedrock Knowledge Bases cost?

There is no charge for the Knowledge Base itself. Your bill has three parts:

CostWhat drives itTypical size
EmbeddingsTokens processed during each syncUsually small. Titan Text Embeddings V2 costs about $0.02 per million tokens
Vector storeThe database that stores and searches vectorsOften the largest fixed cost
Model inferenceTokens sent to and returned by the model that writes answersGrows with usage and prompt size

A worked example. 10,000 documents of about 2,000 tokens each is 20 million tokens. Embedding all of it once with Titan V2 costs roughly $0.40. The embedding cost is almost nothing.

The vector store is where teams get surprised. OpenSearch Serverless bills in compute units per hour, with a minimum even when there is no traffic. A small development collection can cost roughly $175 per month, and a production setup with redundancy roughly double that, before any data grows. Aurora PostgreSQL with pgvector or S3 Vectors can be much cheaper for small and medium workloads. Always check current AWS pricing for your region.

Model inference depends on the model you choose and how much context you send. Retrieving 10 large chunks per question can multiply your token cost compared to retrieving 3 well-chosen ones.

How to keep costs under control

  • Pick the vector store for your scale. Do not default to OpenSearch Serverless for a small knowledge base.
  • Retrieve fewer, better chunks. Tune the number of results and use reranking instead of sending everything to the model.
  • Use a smaller model where it works. Many support and search answers do not need the largest model.
  • Sync on change, not on a timer. Trigger syncs when documents change.
  • Tag everything. Put cost allocation tags on the Knowledge Base, vector store and model usage so you can see the real cost per feature.

Common mistakes and limits

  • Mixing customers’ data without filters. In a multi-tenant SaaS product, every query must filter by tenant using metadata, or each tenant needs a separate Knowledge Base. Test this before launch.
  • Ignoring document quality. Duplicates and old versions lead to confident wrong answers.
  • No evaluation. Keep a fixed set of test questions and re-run it after every change to chunking, models or prompts.
  • Wide IAM permissions. Scope access to specific Knowledge Bases and models.
  • Forgetting quotas. Bedrock has per-account limits on models, Knowledge Bases and requests. Check Service Quotas early if you expect high traffic.

When to use Knowledge Bases, and when not to

Good fit:

  • You want RAG in production in weeks, not months.
  • Your data lives in S3, Confluence, SharePoint or similar sources.
  • You are already on AWS and want everything inside your account.

Consider a custom pipeline when:

  • You need retrieval logic that Knowledge Bases cannot express, such as complex ranking across many data types.
  • You need very strict tenant isolation or data residency rules beyond what metadata filtering gives you.
  • You run very large volumes where a self-managed vector database is cheaper.

Many teams start with Knowledge Bases, learn what their users really ask, and only build custom parts where they hit a limit.

FAQ

Is there a fee for Bedrock Knowledge Bases?

No separate fee. You pay for the embedding model, the vector store and model inference.

Which vector store should I use with Bedrock Knowledge Bases?

For a quick start, OpenSearch Serverless. For small or cost-sensitive workloads, Aurora PostgreSQL with pgvector or S3 Vectors. If you already run Pinecone, MongoDB Atlas or Redis, you can use those.

Can I use Bedrock Knowledge Bases for a multi-tenant SaaS product?

Yes, if you design for it. Add a tenant field to every document’s metadata and filter every query by it, or use a separate Knowledge Base per tenant for stricter isolation.

How long does it take to build a production RAG system on Bedrock?

A working prototype can take a few days. A production system with security, evaluation, monitoring and cost controls usually takes 4 to 8 weeks.

Next step

If you are moving an AI feature from demo to production, the hard parts are not the first prototype. They are tenant isolation, cost control, evaluation and monitoring. See our AWS Bedrock and RAG production build, or start with a fixed-price AI infrastructure assessment to get a clear plan.

Adarsh Singh

Adarsh Singh

Founder, Kestron AI. DevOps and cloud engineer specializing in AWS and production AI infrastructure. AWS Certified Solutions Architect – Associate.