Repository navigation
Optional AgentCore Gateway interface endpoint for runtime → gateway traffic - #45
Merged
Merged
Conversation
Runtimes in VPC mode reached every AgentCore Gateway (MCP tool gateways, and the agentcore_gateway model backend) through the NAT. With enable_gateway_vpce the platform VPC gets a com.amazonaws.<region>.bedrock-agentcore.gateway interface endpoint with private DNS, so *.gateway.bedrock-agentcore.<region> resolves to endpoint ENIs and those calls stay inside the VPC with no URL change. The endpoint policy allows only InvokeGateway on this account's gateways. Principal stays "*": gateways with a CUSTOM_JWT authorizer cannot be matched on an IAM principal in an endpoint policy. The security group admits 443 from the VPC CIDR only. Off by default. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
3 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Runtimes run in VPC mode, but every call they make to an AgentCore Gateway (MCP tool gateways today, the
agentcore_gatewaymodel backend in #40) leaves through the NAT Gateway and reaches the gateway's public endpoint. This adds an opt-in interface VPC endpoint so that traffic stays inside the VPC.enable_gateway_vpce(defaultfalse) creates acom.amazonaws.<region>.bedrock-agentcore.gatewayinterface endpoint in the platform's private subnets with private DNS on:*.gateway.bedrock-agentcore.<region>.amazonaws.comresolves to the endpoint ENIs, so no gateway URL changes anywhere.bedrock-agentcore:InvokeGatewayonarn:aws:bedrock-agentcore:<region>:<account>:gateway/*only.Principalis*because a gateway with aCUSTOM_JWTauthorizer cannot be matched on an IAM principal in an endpoint policy (AgentCore docs, PrivateLink page).docs/architecture.md§3 andterraform/terraform.tfvars.example.Test plan
terraform validate; targeted plan shows exactly 2 to add, 0 to change, 0 to destroy🤖 Generated with Claude Code