Secure AI agents with Policy and Lambda interceptors in Amazon Bedrock AgentCore gateway
Machine Learning Blog
This article demonstrates three design patterns for securing AI agents in Amazon Bedrock AgentCore using Policy and Lambda interceptors.
- Policy provides deterministic, auditable access control using Cedar policy language
- Lambda interceptors enable dynamic validation, token exchange, and payload transformation
- Design 1: Policy-only restricts tools by role with forbid/permit rules
- Design 2: Interceptor-only exchanges JWT for tenant-scoped IAM credentials (act-on-behalf)
- Design 3: Combined approach uses interceptor to inject geography, policy to enforce data-residency rules
- REQUEST interceptors run before Cedar policies, enabling request enrichment before evaluation
- RESPONSE interceptors filter tool lists and redact sensitive information dynamically
- Use Policy for deterministic rules; use interceptors for external lookups and transformations
- Sample lakehouse agent demonstrates role-based access (policyholders, adjusters, admins)
- AWS Lake Formation enforces row/column security at query time
- Full implementation available in GitHub repository with CDK deployment scripts
The layered security architecture combines Policy's auditability with interceptors' flexibility to build comprehensive agent governance at scale.
The AWS News Feed is currently looking for gold sponsors. If you want to support the AWS community and reach a large audience of AWS professionals, consider sponsoring the AWS News Feed.
Related articles
Mar 12
2026
2026
Secure AI agents with Policy in Amazon Bedrock AgentCore
May 5
2026
2026
Secure AI agents with Amazon Bedrock AgentCore Identity on Amazon ECS
Jun 2
2026
2026
Secure multi-tenant AI agents with Amazon Bedrock AgentCore resource-based policies
Oct 14
2025
2025
Securing AI agents with Amazon Bedrock AgentCore Identity
The AWS News Feed is currently looking for silver sponsors. If you want to support the AWS community and reach a large audience of AWS professionals, consider sponsoring the AWS News Feed.