Control which domains your AI agents can access
Summary
Amazon Bedrock AgentCore tools, including Browser, Code Interpreter, and Runtime, can be secured using AWS Network Firewall to implement domain-based egress filtering. This architecture allows AI agents to access the internet while adhering to enterprise security and compliance requirements by restricting outbound traffic to an allowlist of approved domains. The solution deploys AgentCore Browser within a private subnet, routing all outbound HTTPS requests through AWS Network Firewall, which inspects TLS Server Name Indication (SNI) headers to enforce filtering rules. This setup enables explicit domain allowlisting, category-based blocking, and connection logging for audit purposes, mitigating risks like unauthorized access and data exfiltration, and defending against prompt injection attacks that could redirect agents to unintended sites. The post details a CloudFormation template for deployment and configuration steps for IAM roles, Network Firewall rules, and security groups.
Key takeaway
For AI Architects or MLOps Engineers deploying AI agents with internet access in regulated environments, you should implement AWS Network Firewall with Amazon Bedrock AgentCore. This configuration provides essential domain-based egress filtering, ensuring compliance and mitigating prompt injection risks by restricting agent navigation to approved domains. Your team can quickly establish network isolation and audit capabilities using managed AWS services, avoiding complex custom proxy solutions.
Key insights
AWS Network Firewall provides robust domain-based egress filtering for AI agents using Amazon Bedrock AgentCore.
Principles
- Implement defense-in-depth for AI agent security.
- Use SNI inspection for domain-level egress filtering.
- Prioritize allowlisting over denylisting for strict control.
Method
Deploy AgentCore in a private subnet, route outbound traffic through AWS Network Firewall, and configure stateful rules to allow or block domains based on TLS SNI headers, logging all connection attempts.
In practice
- Add ".amazonaws.com" to allowlist for AWS service access.
- Enable ALERT and FLOW logs for auditing and troubleshooting.
- Configure HOME_NET for multi-VPC centralized firewall deployments.
Topics
- AI Agent Security
- AWS Network Firewall
- Amazon Bedrock AgentCore
- Domain Filtering
- Egress Control
Code references
Best for: AI Security Engineer, AI Architect, MLOps Engineer
Related on AIssential
Editorial summary, takeaway, and curation by AIssential. Original article published by Artificial Intelligence.