# AgentCore Gatewayから中央ファイアウォール経由で社内APIへ接続する構成

> ネットワークチームがVPCを管理する環境で、AgentCore Gatewayの通信を中央ファイアウォールへ通す構成を示しました。

- URL: https://cardene.dev/daily/2026-11-19/ai-agents/agentcore-gateway-private-apis
- 紹介した日: 2026-11-19
- カテゴリ: AIエージェントの設計・運用
- 元の記事: https://aws.amazon.com/blogs/machine-learning/connect-amazon-bedrock-agentcore-gateway-to-private-apis-in-a-hub-and-spoke-network-with-centralized-inspection/
- 元の記事の公開日: 2026-11-19

AWSは、`Amazon Bedrock AgentCore Gateway`から社内のREST APIや`MCP`サーバーへ接続する構成を公開しました。
ネットワークチームがすべてのVPCとsubnetを管理し、VPC間通信を中央ファイアウォールで双方向に検査する組織を対象にしています。

## resource gatewayをネットワークアカウントに置く

構成では、ネットワークアカウント内に専用のVPCとsubnetを作り、`VPC Lattice`がそのVPCへの接続を受け付けるresource gatewayを置きます。
バックエンドからは、resource gatewayのアドレスが接続元に見えます。
resource gatewayのsubnetはTransit Gatewayを経由するように経路を設定し、Gatewayと社内APIの往復通信を検査用VPCのファイアウォールへ通します。
各バックエンドには、その宛先 (社内のload balancerのDNS名とport) を名指す`VPC Lattice`の設定のresource configurationを1つ作り、`AWS RAM`でAgentCoreアカウントへ共有します。
AgentCore側は、共有されたresource configurationをGatewayの接続先として使います。

## 検査できる通信とできない通信

社内のApplication Load BalancerやAPI Gatewayへ向かう通信と応答は、中央ファイアウォールを通ります。
一方で、agentからGatewayのinterface endpointへの通信、Gatewayからresource gatewayへの通信、AgentCoreがidentity providerへ求めるtokenはファイアウォールを通りません。
GatewayからALBまでの通信はTLSで暗号化されるため、ファイアウォールが見られるのは通信のmetadataとTLSのSNIです。
リクエスト内容はGateway、AWS WAF、ALBのログで確認します。

## 参考リンク

- [元の記事を読む](https://aws.amazon.com/blogs/machine-learning/connect-amazon-bedrock-agentcore-gateway-to-private-apis-in-a-hub-and-spoke-network-with-centralized-inspection/)
