Function URL invoke hangs when the response stream is empty
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 35/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Estancado
- Stack tecnológico
- aws, node.js, typescript
Línea de trabajo
Comienza con la reproducción en index.cjs usando awslambda.streamifyResponse, HttpResponseStream.from, pipeline y Readable.from(Buffer.alloc(0)) en una invocación de Function URL. Ejecútala en us-east-1 y compara el comportamiento de las cuentas antiguas y nuevas. Se considera terminado cuando un stream de respuesta vacío con statusCode 403 cierra la conexión del cliente en lugar de quedarse bloqueado.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
I have a lambda with response streaming enabled. Invoked via Function URL. I am trying to return a status code with no response body. I have reduced my code to the below sample to reproduce the issue:
// File: index.cjs
// Handler: index.handler
const pipeline = require("util").promisify(require("stream").pipeline);
const { Readable } = require("stream");
exports.handler = awslambda.streamifyResponse(async (event, responseStream, context) => {
responseStream = awslambda.HttpResponseStream.from(responseStream, {
statusCode: 403,
});
await pipeline(
Readable.from(Buffer.alloc(0)),
responseStream,
);
});
I can see the HTTP headers are sent correctly and received by the client. But the connection remains open for up to 16 minutes. It seems like the runtime expects a response body, and if there is none, it just hangs and does not close the connection.
What's even stranger is that I have tested this in 2 different accounts. One of the accounts has been created ages ago, and the code above actually works fine as one would expect. The other account is newer (and it's where that code is supposed to run), and it just hangs and doesn't close the connection. Region is us-east-1.
- Lenguaje dominante
- TypeScript
- Estrellas
- 224
- Forks
- 60
- Merge medio
- 26 min
- PR fusionados (30 d)
- 2
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de aws/aws-lambda-nodejs-runtime-interface-client
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 20/100
aws/aws-lambda-nodejs-runtime-interface-client#198 · 3 comentarios · 6 reacciones ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
aws/aws-lambda-nodejs-runtime-interface-client#195 · 12 reacciones ·
-
bug
aws/aws-lambda-nodejs-runtime-interface-client#170 · 15 comentarios · 6 reacciones · 1 asignado ·
-
AWS Inspector findings for curl Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 38/100
aws/aws-lambda-nodejs-runtime-interface-client#159 · 2 reacciones ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 42/100
aws/aws-lambda-nodejs-runtime-interface-client#145 · 1 comentario · 6 reacciones ·
Todos los issues de aws/aws-lambda-nodejs-runtime-interface-client
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
copse-dev/agent-pane#2953 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
[Bug]: Matrix progress drafts fail with "Matrix runtime not initialized" during tool activity Abiertobug clawsweeper:linked-pr-open clawsweeper:needs-live-repro clawsweeper:no-new-fix-pr impact:message-loss issue-rating: 🐚 platinum hermit P2 regression
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
-
Client support matrix inclusion Abiertoenhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
-
calcite-components needs triage refactor
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Esri/calcite-design-system#15203 ·