Function URL invoke hangs when the response stream is empty
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 35/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- aws, node.js, typescript
Direzione di ricerca
Inizia con la riproduzione in index.cjs usando awslambda.streamifyResponse, HttpResponseStream.from, pipeline e Readable.from(Buffer.alloc(0)) in un’invocazione di Function URL. Eseguila in us-east-1 e confronta il comportamento degli account più vecchi e più nuovi. Il lavoro è completato quando uno stream di risposta vuoto con statusCode 403 chiude la connessione del client invece di rimanere bloccato.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- TypeScript
- Stelle
- 224
- Fork
- 60
- Merge medio
- 26m
- PR unite (30g)
- 2
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di aws/aws-lambda-nodejs-runtime-interface-client
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 20/100
aws/aws-lambda-nodejs-runtime-interface-client#198 · 3 commenti · 6 reazioni ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
aws/aws-lambda-nodejs-runtime-interface-client#195 · 12 reazioni ·
-
bug
aws/aws-lambda-nodejs-runtime-interface-client#170 · 15 commenti · 6 reazioni · 1 assegnatario ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 38/100
aws/aws-lambda-nodejs-runtime-interface-client#159 · 2 reazioni ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 42/100
aws/aws-lambda-nodejs-runtime-interface-client#145 · 1 commento · 6 reazioni ·
Tutte le issue di aws/aws-lambda-nodejs-runtime-interface-client
Issue simili
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
dennys-bd/agent-hive#184 ·
-
Add: hunch Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
AbdelStark/awesome-typesafe#104 ·
-
ai-observability bug team/ai-observability
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
vicharanashala/fln#563 ·