Connect Amazon Bedrock AgentCore Gateway to private APIs in a hub-and-spoke network with centralized inspection
This article presents a hub‑and‑spoke networking pattern that lets Amazon Bedrock AgentCore Gateway call private REST APIs and Model Context Protocol (MCP) servers while forcing all traffic through a central firewall. The solution uses an Amazon VPC Lattice resource gateway—either created by AgentCore in managed mode or provisioned manually in self‑managed mode—and shares the gateway via AWS Resource Access Manager across three member accounts and a management account in the us‑east‑1 region. Engineers can adopt the CloudFormation templates and test scripts provided to replicate the pattern in their own AWS Organizations, ensuring centralized inspection without relinquishing subnet ownership.
⚡ Key Takeaways
- The pattern was built and validated in the US East (N. Virginia) region (us-east-1) using three member accounts plus a management account.
- Uses an Amazon VPC Lattice resource gateway as the entry point for the AgentCore Gateway to reach private load balancers or VPC endpoint DNS names.
- Supports two private endpoint options: managed mode (AgentCore creates the resource gateway) and self‑managed mode (customers create the gateway and attach a resource configuration).
- Traffic between the Gateway and private APIs/MCP servers traverses a central firewall in an inspection VPC in both directions.
- The solution is delivered via AWS CloudFormation templates, test scripts, and reference material hosted in a companion repository.
By enforcing central inspection while preserving subnet ownership, engineers can safely expose internal services to Bedrock agents without redesigning network security policies, accelerating secure AI integration in enterprise environments.
✅ Practical Steps
- Deploy the provided AWS CloudFormation templates from the companion repository into your management and member accounts to create the VPC Lattice resource gateway and associated resource configurations.
- Choose managed mode if you want AgentCore to provision the gateway automatically, or self‑managed mode if you prefer to create the gateway yourself and then attach the target’s backend configuration via AWS RAM.
- Run the included test scripts to validate that traffic between the AgentCore Gateway and your private APIs/MCP servers passes through the central firewall as expected.
Want the full story? Read the original article.
Read on AWS ML Blog ↗