Connecting AgentCore Gateway to private APIs with central inspection
In many enterprises a central network team owns every VPC and subnet, and every flow between VPCs must pass a central firewall in both directions. Agents calling internal REST APIs and MCP servers through Amazon Bedrock AgentCore Gateway must meet the same rules, but the two documented private-endpoint modes each satisfy only one half: managed mode lets AgentCore own the subnets, while self-managed mode places the resource gateway where traffic bypasses inspection. The authors set out to find a layout that keeps network-team ownership and central inspection at once.
In many enterprises a central network team owns every VPC and subnet, and every flow between VPCs must pass a central firewall in both directions. Agents calling internal REST APIs and MCP servers through Amazon Bedrock AgentCore Gateway must meet the same rules, but the two documented private-endpoint modes each satisfy only one half: managed mode lets AgentCore own the subnets, while self-managed mode places the resource gateway where traffic bypasses inspection. The authors set out to find a layout that keeps network-team ownership and central inspection at once.
The pattern uses self-managed mode with one change: the network account creates the VPC Lattice resource gateway (the entry point into a VPC, made of network interfaces in chosen subnets) in its own dedicated VPC and subnets, does not share them, and routes them through AWS Transit Gateway. Because the resource gateway's subnets route through the transit gateway, every request and reply between the Gateway and the tool account crosses the inspection VPC's firewall. The network team shares one resource configuration per backend (an internal load balancer or execute-api endpoint) with the AgentCore account through AWS RAM; when a target is created, AgentCore attaches that configuration to its own VPC Lattice service network, and AWS carries the hop into the network account. The authors tested this in us-east-1 with three member accounts and a management account, and published CloudFormation templates, test scripts and 14 validation checks. Key operational findings: the firewall needs only two stateful allows (resource gateway subnets to the tool VPC on 443, and ALB subnets to the identity provider's host name on 443 for signing keys); without the second, the ALB returned HTTP 500 and the agent saw "MCP invocation failed". A deliberately added reply-direction drop rule made calls hang and logged to_client drops, proving replies cross the firewall. The ALB or private API must validate the Gateway's token, pinning client_id, and a Gateway resource policy limited to the interface endpoint closed public access (internet calls returned -32002). The authors are explicit about limits: traffic is TLS end to end, so the firewall sees flow metadata and SNI, not payloads; the agent-to-endpoint and Gateway-to-resource-gateway legs skip the firewall, as do token requests to identity providers; and with the client credentials grant the tool sees only the Gateway's identity. Each target also carries an hourly VPC Lattice association charge, and the tests covered only AWS Network Firewall, no source NAT, and one Region.
If your network team owns every subnet and requires central inspection, put the VPC Lattice resource gateway in the network account and route it through the transit gateway; the network team sets this up once and adds one resource configuration per backend. Expect flow-level rather than payload inspection, and run the authors' validation checks in your own environment before relying on the pattern.