Article

Connect AgentCore to private APIs through a central firewall

For teams connecting AgentCore to internal APIs, compare managed and network-owned routing, inspection limits, identity and recurring costs.

Editorial illustration for Connect AgentCore to private APIs through a central firewall: a controlled task flows from input to output. Not documentary evidence.

AWS’s November 18, 2026 walkthrough shows enterprise teams how to connect Amazon Bedrock AgentCore Gateway to private APIs while a central network account retains ownership of every subnet. The design puts a self-managed VPC Lattice resource gateway—the entry point into the private network—in that account and routes backend calls through central inspection. It checks connections, not encrypted request contents, and is a reference architecture rather than a new service launch.

Which connectivity mode fits your network?

Start with who can own the subnets, not simply whether your organisation has a firewall. AWS documents two connectivity modes, including managed connectivity that can use an existing hub-and-spoke network:

  • The Gateway account can own suitable subnets: evaluate managed mode first. Supply the network settings and let AgentCore manage the connectivity resources. Existing routes can still take traffic through inspection.

  • The network account must own the entry point: use self-managed mode. The network account creates the resource gateway and shares backend resource configurations with the AgentCore account through AWS Resource Access Manager (RAM). Each configuration identifies a private endpoint. Your teams retain more setup and lifecycle work.

  • Cross-account access does not require central inspection: consider ordinary self-managed sharing without the dedicated inspection layout. The extra routing exists to meet that particular requirement, not every private API connection.

Where the firewall sits—and what it cannot see

In the reference layout, the resource gateway has its own virtual private cloud (VPC), separate from both the agent and the backend tools. A network-owned resource gateway routes backend requests and replies through the central firewall. AWS Transit Gateway connects these networks; separate route tables and appliance mode on the inspection attachment keep both directions on the intended firewall path.

That placement matters. Putting the entry point and backend in the same VPC could give traffic a local path that misses central inspection. The architecture’s useful distinction is therefore not merely “private”: it is private access through a network-owned, deliberately routed entry point.

The cross-account build sequence divides responsibility. The network team owns routes, firewall rules and shared backend configurations. The tool team owns its API or load balancer and token validation. The AgentCore team owns Gateway targets and credential-provider configuration. Agree the backend hostname, trusted certificate, allowed source ranges and shared-resource identifiers before building targets.

Central inspection does not mean complete content inspection. In AWS’s demonstrated path, encryption remains in place between Gateway and the internal load balancer. The firewall sees flow information and the TLS server name, not the tool-call body. The agent-to-interface-endpoint hop, AWS’s Gateway-to-resource-gateway hop and AgentCore’s identity-provider token requests do not cross that firewall.

If your requirement is to decrypt every payload or inspect every service hop centrally, this sample does not satisfy it as written. Those controls need a separate design decision.

Private access does not decide whose permissions apply

The sample uses OAuth client credentials: the internal tool sees the application’s identity, not the employee who asked the question. AWS’s outbound-authentication guide distinguishes this machine identity from user-delegated access and token exchange. Decide whether the tool should act with shared service permissions or enforce each employee’s access before adopting the sample’s authentication choice.

For that separate permissions decision, see choosing user or service access from AgentCore. A private network route does not turn a shared application token into a user-specific one.

Also distinguish reaching Gateway privately from preventing public invocation. An interface endpoint policy controls traffic using that endpoint. Use a Gateway resource policy tied to the intended endpoint, with the appropriate allow and deny conditions, to reject other paths. AWS reports testing this distinction in its lab results; do not assume creating the endpoint closes public access.

For a private Amazon API Gateway REST API that needs OAuth or cross-account access, use an OpenAPI target, rather than selecting the separate native API Gateway target type just because the backend has that name.

Budget for connections, not just calls

The two modes also differ in charging. AWS’s connectivity comparison lists data-processing charges for managed mode, versus hourly resource charges plus processing for self-managed mode. The small Gateway invocation price is not an all-inclusive private-network price.

At the rates checked on November 18, VPC Lattice’s US East (N. Virginia) resource example uses $0.10 per resource-hour. AgentCore Gateway pricing lists $0.005 per 1,000 standard operations such as InvokeTool, ListTools and Ping. Search and tool indexing are priced separately.

For a 30-day illustration, not a deployment quote, assume three targets each create a separate billed resource association, all remain provisioned for 720 hours, and there are one million standard Gateway operations, with no credits or discounts:

  • Hourly connectivity: 3 × 720 × $0.10 = $216.

  • Standard Gateway operations: 1,000,000 ÷ 1,000 × $0.005 = $5.

Those are two cost components, not the total bill. Lattice data processing is additional: its example starts consumer processing at $0.01/GB and separately charges the resource provider $0.006/GB. Budget for firewall, transit gateway, NAT, interface endpoints and load balancer charges where used, plus logs, tool execution, runtime and model inference. Taxes, discounts and deployment-specific transfer charges are outside this illustration.

The association assumption comes from AWS’s November 12 lab run: separate targets received separate associations even when they shared a resource configuration. Adding tools within an existing target did not add another association. Verify the distinct resourceAssociationArn values returned for your targets; one load balancer or shared configuration does not by itself establish one hourly charge.

Choose target boundaries around a coherent API or Model Context Protocol (MCP) server, rather than splitting every operation into its own target. Separately, large internal responses can affect model costs; the guide to keeping large JSON out of AgentCore prompts addresses that data-handling decision.

Checks before adopting the sample

The repository is an educational lab, shipped for us-east-1 and dedicated non-production accounts. Its regional identifiers need adapting elsewhere. AWS lists third-party firewalls, source NAT, other Regions and private identity providers as untested; these are limits of the sample, not a statement that the services cannot support them. Its November 12 clean-run report also excludes the optional Runtime-as-caller and WAF rate-limit tests from that run.

Use the lab to define acceptance checks with the network and tool owners:

  • Prove the route and identity boundaries. In a non-production environment, verify that blocking replies at the firewall stops calls, invalid tool tokens are rejected, and the intended private Gateway path works while public invocation is denied. AWS’s validation checks describe these tests.

  • Include authentication traffic. The load balancer needs a permitted path to fetch identity-provider signing keys. An isolated agent also needs a way to obtain its inbound token; the lab obtained that token outside the isolated agent VPC. A working backend route alone is insufficient.

  • Plan certificate changes. Gateway’s private-CA documentation supports configured private trust, but Gateway does not check certificate revocation lists or use online certificate-status checks (OCSP). Existing connections can retain previous trust material for up to 15 minutes after a change.

  • Make access removal explicit. Removing a resource from a RAM share prevents new associations but leaves existing ones in place. Include deletion of the relevant targets or associations in the revocation procedure.

  • Separate network and application logs. The sample’s logging guide distinguishes firewall flow records from Gateway application logs containing request and response bodies. Set access and retention for the data each actually records.

Choose this pattern when central ownership and the backend inspection route are both requirements. If managed connectivity already meets them, the extra lifecycle work has no automatic benefit. If employee-specific permissions or decrypted-content inspection are required, resolve those separately before treating the network design as complete.