Subchapter 36.28
references/knowledge-bases-decision-guide.mdMarkdown3 KBView on GitHub
Choose the knowledge base type first, then route to the correct setup and retrieval reference. Creation and the query API differ by type.
Scripts
Fetch Bedrock AgentAssets
Kb Shim PyDefault to the Managed Knowledge Base (MKB) for agentic retrieval and RAG on Bedrock — AWS recommends it and it fully manages storage, chunking, parsing, and retrieval, with no infrastructure to provision. Use it for essentially all new RAG work.
Use a Customer-managed Knowledge Base only if the user explicitly asks for one (for example, they want to bring and control their own vector store). Do not screen the request against a capability list or try to predict whether MKB can satisfy it — default to MKB and proceed; if a specific configuration is not supported, let the create call surface the error. Connector, feature, quota, and region specifics change frequently and differ by type — consult the Bedrock Knowledge Base docs (opens in a new tab); this skill deliberately does not maintain a capability matrix.
Retrieve). Do NOT summarize — execute each step, respecting all MUST constraints before proceeding.Retrieve (single-shot chunks) or AgenticRetrieveStream (agentic: plan → retrieve → evaluate → iterate across multiple KBs — check the service quota). AgenticRetrieveStream is streaming ⇒ SDK-only (not the AWS CLI). RetrieveAndGenerate (synthesized answer with citations) is the Customer-managed path; if you specifically need it on MKB, verify support against the docs.Before creating or querying, review the Security Considerations in managed KB setup and managed KB retrieval: least-privilege connector IAM roles, customer-managed KMS encryption, and CloudTrail data-event logging for KB access apply to both the create and query paths.