feat(gateway-target): support privateEndpoint (VPC Lattice) on gateway targets
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 35/100
- Issue 类型
- 功能
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- aws, json, typescript
调研方向
Start with AgentCoreGatewayTargetSchema, the existing PrivateEndpointSchema, and the AgentCoreGateway CDK construct; inspect how target configuration is parsed, deployed, and updated. Check the target type support in the linked AWS Gateway VPC egress documentation and the CfnGatewayTarget.PrivateEndpoint property. Done means supported target types accept and validate both endpoint forms and overrides, deploy without drift, and have the requested docs examples.
由索引模型根据 Issue 内容生成。
描述
Description
Support privateEndpoint (and privateEndpointOverrides) on Gateway Targets in the project spec, agentcore add gateway-target, and the @aws/agentcore-cdk L3 construct, so targets can reach private resources in a customer VPC through VPC Lattice.
AgentCore Gateway supports this today for target types such as MCP server and OpenAPI targets (see Configure AgentCore Gateway VPC egress for Gateway Targets), using either a gateway-managed VPC Lattice resource (managedVpcResource) or a self-managed one (selfManagedLatticeResource), with optional routingDomain to route through an intermediate component such as a VPC endpoint or internal load balancer. None of this can currently be declared in an AgentCore CLI project, so private targets have to be configured outside the CLI.
Proposed usage:
agentcore add gateway-target --gateway MyGateway --target-configuration '{
"name": "MyPrivateTarget",
"targetType": "mcpServer",
"endpoint": "https://mcp.internal.example.com/mcp",
"privateEndpoint": {
"managedVpcResource": {
"vpcIdentifier": "vpc-xxxx",
"subnetIds": ["subnet-aaaa", "subnet-bbbb"],
"endpointIpAddressType": "IPV4",
"securityGroupIds": ["sg-xxxx"]
}
}
}'
agentcore deploy
The same privateEndpoint block would apply to other supported target types, e.g. an OpenAPI target whose servers[0].url points at a private endpoint:
{
"name": "MyPrivateApi",
"targetType": "openApiSchema",
"schemaSource": { "inline": { "path": "openapi/my-api.json" } },
"outboundAuth": { "type": "API_KEY", "credentialName": "MyApiKey" },
"privateEndpoint": {
"managedVpcResource": {
"vpcIdentifier": "vpc-xxxx",
"subnetIds": ["subnet-aaaa", "subnet-bbbb"],
"endpointIpAddressType": "IPV4",
"securityGroupIds": ["sg-xxxx"],
"routingDomain": "<optional intermediate domain, e.g. a VPC endpoint DNS name>"
}
}
}
or a self-managed Lattice resource:
"privateEndpoint": {
"selfManagedLatticeResource": { "resourceConfigurationIdentifier": "rcfg-xxxx" }
}
Optional shortcut flags for the common managed case could mirror the JSON, e.g.:
agentcore add gateway-target --gateway MyGateway --name MyPrivateTarget \
--endpoint https://mcp.internal.example.com/mcp \
--vpc vpc-xxxx --subnets subnet-aaaa subnet-bbbb --security-groups sg-xxxx \
[--routing-domain <domain>]
Current behavior (agentcore CLI 1.0.1, @aws/agentcore-cdk 1.0.1, latest on npm):
Error: Invalid value for option '--target-configuration': Unrecognized key: "privateEndpoint"
AgentCoreGatewayTargetSchemais.strict()and has noprivateEndpointfield.PrivateEndpointSchema/ManagedVpcResourceSchema(includingroutingDomain) already exist in the CLI, but they are only wired intoCustomJwtAuthorizerConfigSchema(inbound auth discovery).@aws/agentcore-cdkAgentCoreGatewaynever setsprivateEndpointon the targets it creates.
Workaround today: add the target with the CLI, agentcore deploy, then patch it out of band with aws bedrock-agentcore-control update-gateway-target --private-endpoint .... This works end to end (the gateway provisions a managed VPC Lattice resource gateway and tool calls succeed), but:
- it is drift outside CloudFormation, so a later deploy that updates the target can drop
privateEndpoint; - the update must resend the full target, and resending the returned
metadataConfigurationfails withHeader 'x-amzn-bedrock-agentcore-policy-session-id' is restricted and cannot be configured(that header is present when a policy engine is attached), so it has to be stripped first.
Note: AWS::BedrockAgentCore::GatewayTarget now has a PrivateEndpoint property (CfnGatewayTarget.privateEndpoint in aws-cdk-lib 2.269.0), so this can go through the CDK path rather than a post-deploy call.
Acceptance Criteria
-
agentCoreGateways[].targets[]accepts an optionalprivateEndpoint(exactly one ofmanagedVpcResource/selfManagedLatticeResource, reusing the existingPrivateEndpointSchema) andprivateEndpointOverrides, for every target type the service supports with private endpoints. -
agentcore add gateway-target --target-configurationaccepts the field; validation rejects it on target types that don't support it. -
@aws/agentcore-cdkmaps it toCfnGatewayTarget.PrivateEndpoint, andagentcore deploycreates and updates targets with it, with no drift on later deploys. - Optional: shortcut flags on
agentcore add gateway-target(e.g.--vpc,--subnets,--security-groups,--routing-domain) and TUI support. - Docs: examples for a managed private endpoint, a self-managed Lattice resource, and
routingDomain.
Additional Context
- Related: #1362 (closed as completed), which tracked VPC egress for gateway targets when CloudFormation did not yet support it. In 1.0.1, target-level private endpoints are still not configurable.
- Reference: Configure Amazon Bedrock AgentCore Gateway VPC Egress for Gateway Targets:
privateEndpointexamples for MCP server and OpenAPI targets,routingDomain, and private REST APIs in API Gateway.
- 主要语言
- TypeScript
- 星标
- 339
- 派生
- 129
- 平均合并
- 19 小时 21 分钟
- 30 天内合并 PR
- 125
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
aws/agentcore-cli 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 88/100
aws/agentcore-cli#2940 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
aws/agentcore-cli#2939 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 84/100
aws/agentcore-cli#2938 ·
维护者通常 1 天内回复
-
invoke: CUSTOM_JWT runtime errors discard the response body and error type (e.g. "Token has expired")可能已有人在做 @n1dhruv 于 6 天前认领。 未关闭bug
难度 2/5 1-3 小时 新手友好度 82/100
aws/agentcore-cli#2875 · 1 条评论 ·
维护者通常 1 天内回复
-
--debug has no effect; service error name, HTTP status and request ID never reach the terminal可能已有人在做 @abhiramshaji-cyber 于 3 天前认领。 未关闭bug
难度 2/5 1-3 小时 新手友好度 78/100
aws/agentcore-cli#2874 ·
维护者通常 1 天内回复
查看 aws/agentcore-cli 的全部 Issue
相似的 Issue
-
manually bump balena-preload to ^19.0.6可能已有人在做 @shaunmulligan 今天认领。 未关闭
难度 1/5 1-3 小时 新手友好度 66/100
balena-io/balena-cli#3200 ·
维护者通常 1 天内回复
-
`MaterializedChatMessage._text` is quadratic in the number of text chunks (`+=` followed by `endsWith`), driving the extension host to heap OOM可能已有人在做 @olegius88 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 79/100
microsoft/vscode-prompt-tsx#205 ·
-
triage
难度 1/5 1 小时以内 新手友好度 64/100
-
难度 2/5 1-3 小时 新手友好度 76/100
melgarafael/DeskcommCRM#5340 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 83/100
ehmpathy/rhachet-roles-ehmpathy#1529 ·
维护者通常 1 天内回复