Support allowedPorts (session endpoints) on runtimes

Abierto
#2,811 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
35/100
Tipo de issue
Nueva funcionalidad
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
aws, typescript
Área
cli, cloud

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.
Lenguaje dominante
TypeScript
Estrellas
339
Forks
129
Merge medio
19 h 21 min
PR fusionados (30 d)
125

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de aws/agentcore-cli

Todos los issues de aws/agentcore-cli

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.