Support allowedPorts (session endpoints) on runtimes

オープン
#2,811 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
aws, typescript
領域
cli, cloud

調査の方向性

Start by reading RuntimeSpecSchema in the @aws/agentcore CLI and trace how agentcore deploy creates and updates runtimes. Then check the AgentCoreRuntime construct in @aws/agentcore-cdk and the runtime and invoke commands; CloudFormation support for AllowedPorts is a stated dependency. Done means the spec accepts the documented port rules, deploys preserve the setting, and the relevant commands can print a session endpoint URL.

索引モデルが issue の本文から書いたものです。

説明

Description

A runtime's agentcore.json spec has no field for allowedPorts, so a project deployed with agentcore deploy cannot enable session endpoints. The gap is also in CloudFormation: AWS::BedrockAgentCore::Runtime has no AllowedPorts property (checked with aws cloudformation describe-type --type RESOURCE --type-name AWS::BedrockAgentCore::Runtime in ap-southeast-1). Today the only way to get the setting is to call CreateAgentRuntime or UpdateAgentRuntime directly, outside the project.

Patching the runtime after agentcore deploy does not hold up. UpdateAgentRuntime replaces the whole configuration, so the next deploy is likely to drop allowedPorts again, and the session endpoint stops working with no error.

Our use case is an agent that serves a REST API with server-sent events. We want to reach it through each session's endpoint, because InvokeAgentRuntime turns any non-2xx answer into 424 RuntimeClientError and drops the response's headers. We have worked around this by wrapping our API inside /invocations. We would rather use session endpoints, which is what they are for.

Acceptance Criteria
  • A runtime in agentcore.json accepts allowedPorts with the API's rules: 1–5 entries, each a port or a portRange, within 8000–12000, and none of them reserved.
  • agentcore deploy creates and updates the runtime with them, and a later deploy keeps them.
  • The AgentCoreRuntime construct in @aws/agentcore-cdk exposes them (this depends on CloudFormation supporting AllowedPorts on AWS::BedrockAgentCore::Runtime).
  • agentcore invoke, or the runtime commands, can print a session's sessionEndpointUrl.
Additional Context
  • CLI @aws/agentcore 1.0.3 and @aws/agentcore-cdk 1.0.3: RuntimeSpecSchema has no allowedPorts field.
  • On a runtime created through the API with allowedPorts: [{ port: 8080 }], the session endpoint passes every method, path, status code, header and SSE stream as documented, with about the same latency as InvokeAgentRuntime.
主要言語
TypeScript
スター
339
フォーク
129
平均マージ
19時間 21分
マージ済み PR(30日)
125

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

aws/agentcore-cli のほかの issue

aws/agentcore-cli の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。