AI Cloud Architect

Secure AI agents with Policy and Lambda interceptors in Amazon Bedrock AgentCore gateway

AWSHow-to by Bharathi Srinivasan, Renya Kujirada and Subha KaliaAWS Artificial Intelligence Blog

In this post, we use a lakehouse data agent to demonstrate how you can use Policy for deterministic access control and Lambda interceptors for dynamic validation. We then show how to combine Lambda interceptors and Policy to implement a geography-based access control which requires both dynamic validation and deterministic access control.

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

AI: Summary

What it is

AgentCore Gateway can combine Cedar Policy (deterministic allow/deny) with Lambda interceptors (runtime validation and enrichment) to control agent tool access, shown with a lakehouse claims agent.

Who it is for

Teams running AI agents on Amazon Bedrock AgentCore Gateway that need per-user or per-geography tool access controls.

Key points

  • Cedar policies are evaluated after the REQUEST interceptor, so interceptors can inject data (such as user geography) that policies then check.
  • Policy Engine starts in LOG_ONLY mode recommended before switching to ENFORCE.
  • Sample code for the three designs is in the awslabs agentcore-samples GitHub repository.

The same at other vendors

Timeline

Posts about Amazon Bedrock AgentCore Gateway, oldest first.

  1. What it explainsPolicy in Amazon Bedrock AgentCore is now generally available · AWS · Announcement
  2. Read firstSecure AI agents with Policy in Amazon Bedrock AgentCore · AWS · How-to
  3. How-toConnecting MCP servers to Amazon Bedrock AgentCore Gateway using Authorization Code flow · AWS · How-to
  4. How-toConfiguring Amazon Bedrock AgentCore Gateway for secure access to private resources · AWS · How-to
  5. This postSecure AI agents with Policy and Lambda interceptors in Amazon Bedrock AgentCore gateway
  6. Blog postExtending MCP support for Amazon Bedrock AgentCore Gateway · AWS · Blog post
  7. How-toBuilding a secure auth code flow setup using AgentCore Gateway with MCP clients · AWS · How-to
  8. Generally availableIntroducing Web Search on Amazon Bedrock AgentCore · AWS · Announcement
  9. Generally availableAWS WAF adds support for Amazon Bedrock AgentCore Gateway · AWS · Announcement
Show all 30 posts
  1. New featureAmazon Bedrock AgentCore Gateway supports AWS PrivateLink invocation and invocation logging · AWS · Announcement
  2. How-toSecure ingress connectivity to Amazon Bedrock AgentCore Gateway using interface VPC endpoints · AWS · How-to
  3. Blog postTransform your MCP architecture: Unite MCP servers through AgentCore Gateway · AWS · Blog post
  4. How-toBuild a biomedical research agent with Biomni tools and Amazon Bedrock AgentCore Gateway · AWS · How-to
  5. New featureApply fine-grained access control with Bedrock AgentCore Gateway interceptors · AWS · Announcement
  6. Blog postStreamline AI agent tool interactions: Connect API Gateway to AgentCore Gateway with MCP · AWS · Blog post
  7. What it explainsPolicy in Amazon Bedrock AgentCore is now generally available · AWS · Announcement
  8. Read firstSecure AI agents with Policy in Amazon Bedrock AgentCore · AWS · How-to
  9. How-toConnecting MCP servers to Amazon Bedrock AgentCore Gateway using Authorization Code flow · AWS · How-to
  10. How-toConfiguring Amazon Bedrock AgentCore Gateway for secure access to private resources · AWS · How-to
  11. This postSecure AI agents with Policy and Lambda interceptors in Amazon Bedrock AgentCore gateway
  12. Blog postExtending MCP support for Amazon Bedrock AgentCore Gateway · AWS · Blog post
  13. How-toBuilding a secure auth code flow setup using AgentCore Gateway with MCP clients · AWS · How-to
  14. Generally availableIntroducing Web Search on Amazon Bedrock AgentCore · AWS · Announcement
  15. Generally availableAWS WAF adds support for Amazon Bedrock AgentCore Gateway · AWS · Announcement
  16. How-toImplement on-behalf-of token exchange for multi-tenant agents with Amazon Bedrock AgentCore Gateway · AWS · How-to
  17. Update to an existing featureHow AgentCore Gateway supports the MCP 2026-07-28 spec · AWS · Announcement
  18. How-toConfigure rate limits for AI traffic on AgentCore gateway · AWS · How-to
  19. How-toSecuring AI agents with temporal policies in Amazon Bedrock AgentCore · AWS · How-to
  20. How-toGovern AI agent tool access with Amazon Bedrock AgentCore Gateway · AWS · How-to
  21. How-toBuild a multi-account AI agent with AgentCore Gateway and MCP · AWS · How-to
  22. Update to an existing featureAgentCore Gateway supports private TLS certificates for VPC endpoints · AWS · Announcement
  23. Blog postHow Eon built multi-cloud investigation with an MCP Gateway on Amazon Bedrock AgentCore · AWS · Blog post
  24. New featureAgentCore Gateway now supports Bedrock InvokeModel APIs and model fallback · AWS · Announcement
  25. New featureAWS Step Functions workflows now available as AI agent tools · AWS · Announcement
  26. Customer storyHow MoEngage turned over 400 APIs into agent tools with AgentCore Gateway · AWS · Customer story
  27. How-toServiceNow on-behalf-of token exchange with Bedrock AgentCore Gateway · AWS · How-to
  28. How-toGovern AI agent access with Okta Cross App Access and Amazon Bedrock AgentCore – Part 2 · AWS · How-to
  29. How-toConnect Amazon Bedrock AgentCore Gateway to private APIs in a hub-and-spoke network with centralized inspection · AWS · How-to
  30. Blog postProtect agent tool calls with Skyflow and Amazon Bedrock AgentCore Gateway · AWS · Blog post

Go deeper