AI Cloud Architect

Fine-grained access control for Amazon Bedrock Managed Knowledge Base tools

AWSHow-to by Renya Kujirada, Kaito Narimoto and Siddhant SahuAWS Artificial Intelligence Blog

Learn how to expose an Amazon Bedrock Managed Knowledge Base to AI agents as MCP tools through Amazon Bedrock AgentCore Gateway while keeping per-user access control. A request interceptor injects verified identity, Policy in AgentCore validates it independently, and a resource-based policy restricts direct access to the knowledge base.

Read the original (opens the source's page in a new tab)

AI: Summary

What it is

Shows how to expose a Managed Knowledge Base to agents through AgentCore Gateway with per-user search scope, using a request interceptor, Policy in AgentCore and a resource-based policy.

Who it is for

Teams building multi-user agents on Bedrock AgentCore that search a shared knowledge base and must limit results per user.

Key points

  • The interceptor overwrites userContext from the verified token, so the LLM cannot set it.
  • Cognito access tokens need an email claim added by a pre token generation trigger, which requires the Essentials or Plus plan.
  • The resource-based policy denies Retrieve and GetDocumentContent to principals other than the gateway execution role.

The same at other vendors

Timeline

Posts about Amazon Bedrock Knowledge Bases, oldest first.

  1. Customer storyHow IskayPet unified corporate knowledge with Amazon Bedrock Managed Knowledge Bases · AWS · Customer story
  2. How-toBuild agentic retrieval on a Managed Amazon Bedrock Knowledge Base with CDK · AWS · How-to
  3. How-toPrepare web content for Amazon Bedrock Knowledge Bases with Crawl4AI · AWS · How-to
  4. How-toSingle-shot and agentic retrieval with Amazon Bedrock Managed Knowledge Base · AWS · How-to
  5. This postFine-grained access control for Amazon Bedrock Managed Knowledge Base tools
  6. How-toMigrate to Amazon Bedrock Managed Knowledge Base with your coding agent · AWS · How-to
  7. How-toCustomize answers per tenant in Amazon Bedrock Managed Knowledge Base · AWS · How-to
  8. How-toGet answers from tables with tabular search in Amazon Bedrock Managed Knowledge Base · AWS · How-to
  9. How-toBuild memory-aware AI agents with Agentic Retrieve on Amazon Bedrock Managed Knowledge Base · AWS · How-to
Show all 38 posts
  1. How-toDeploy Amazon Bedrock Knowledge Bases using Terraform for RAG-based generative AI applications · AWS · How-to
  2. What it explainsApply fine-grained access control with Bedrock AgentCore Gateway interceptors · AWS · Announcement
  3. Generally availableMultimodal retrieval for Bedrock Knowledge Bases now generally available · AWS · Announcement
  4. What it explainsAmazon Bedrock AgentCore adds quality evaluations and policy controls for deploying trusted AI agents · AWS · Announcement
  5. How-toSecuring Amazon Bedrock cross-Region inference: Geographic and global · AWS · How-to
  6. Generally availableIntroducing multimodal retrieval for Amazon Bedrock Knowledge Bases · AWS · Announcement
  7. How-toHow Ring scales global customer support with Amazon Bedrock Knowledge Bases · AWS · How-to
  8. How-toBuild and deploy an automatic sync solution for Amazon Bedrock Knowledge Bases · AWS · How-to
  9. Generally availableAmazon Bedrock Managed Knowledge Base is now generally available · AWS · AnnouncementAlso published by AWS News Blog
  10. Blog postSecure multi-tenant RAG with Amazon Bedrock and Verified Permissions · AWS · Blog post
  11. What it explainsBuilding agentic AI applications with a modern data mesh strategy on AWS · AWS · How-to
  12. How-toPowering scientific discovery: BYOKG and GraphRAG for intelligent pharmaceutical research · AWS · How-to
  13. How-toAgentic retrieval for Amazon Bedrock Managed Knowledge Base · AWS · How-to
  14. How-toImprove contract search accuracy with auto-generated filters in Amazon Bedrock · AWS · How-to
  15. How-toDemocratizing institutional knowledge: Building an AI-powered knowledge management system with AWS · AWS · How-to
  16. Blog postBuild multi-tenant agentic chat applications on enterprise data with Amazon Bedrock Managed Knowledge Base · AWS · Blog post
  17. How-toBuild observable enterprise agentic retrieval using Managed Amazon Bedrock Knowledge Base with AWS CloudFormation · AWS · How-to
  18. How-toCustomizing your knowledge base on Amazon Bedrock for large and complex documents using Amazon Textract · AWS · How-to
  19. New featureAmazon Bedrock Managed Knowledge Base now supports automatic sync scheduling for data source connectors · AWS · Announcement
  20. New featureAmazon Bedrock Managed Knowledge Base now supports ServiceNow as a native data source connector · AWS · Announcement
  21. New featureAmazon Bedrock Managed Knowledge Base introduces user-managed setup for SharePoint, OneDrive, and Confluence data sources · AWS · Announcement
  22. New featureAmazon Bedrock Managed Knowledge Base now supports Confluence Data Center as a native data source connector · AWS · Announcement
  23. New featureAmazon Bedrock Managed Knowledge Base adds APIs and console support for debugging document-level access control · AWS · Announcement
  24. How-toVideo and image search in Amazon Bedrock Knowledge Base using Marengo 3.0 · AWS · How-to
  25. New modelAmazon Bedrock Managed Knowledge Base now supports multimodal embeddings for video, audio, and image content with TwelveLabs Marengo 3.0 · AWS · Announcement
  26. New featureAmazon Bedrock Managed Knowledge Base now supports Salesforce and Zendesk as native data source connectors · AWS · Announcement
  27. How-toQuery claims in natural language with Amazon Bedrock Knowledge Bases · AWS · How-to
  28. How-toAgentic retrieval with LangChain and Amazon Bedrock Knowledge Bases · AWS · How-to
  29. Blog postRethinking access control for RAG with AWS Quick and Amazon Bedrock · AWS · Blog post
  30. Customer storyHow IskayPet unified corporate knowledge with Amazon Bedrock Managed Knowledge Bases · AWS · Customer story
  31. How-toBuild agentic retrieval on a Managed Amazon Bedrock Knowledge Base with CDK · AWS · How-to
  32. How-toPrepare web content for Amazon Bedrock Knowledge Bases with Crawl4AI · AWS · How-to
  33. How-toSingle-shot and agentic retrieval with Amazon Bedrock Managed Knowledge Base · AWS · How-to
  34. This postFine-grained access control for Amazon Bedrock Managed Knowledge Base tools
  35. How-toMigrate to Amazon Bedrock Managed Knowledge Base with your coding agent · AWS · How-to
  36. How-toCustomize answers per tenant in Amazon Bedrock Managed Knowledge Base · AWS · How-to
  37. How-toGet answers from tables with tabular search in Amazon Bedrock Managed Knowledge Base · AWS · How-to
  38. How-toBuild memory-aware AI agents with Agentic Retrieve on Amazon Bedrock Managed Knowledge Base · AWS · How-to

Go deeper