Title: Event on client disconnect/abort in a streaming response · Issue #145 · aws/aws-lambda-nodejs-runtime-interface-client · GitHub
Open Graph Title: Event on client disconnect/abort in a streaming response · Issue #145 · aws/aws-lambda-nodejs-runtime-interface-client
X Title: Event on client disconnect/abort in a streaming response · Issue #145 · aws/aws-lambda-nodejs-runtime-interface-client
Description: Im wondering if its possible to get any event emitted when a client aborts or disconnects during a streaming response with awslambda.streamifyResponse. I tried with this code, but from my testing it looks like theres no event emitted on ...
Open Graph Description: Im wondering if its possible to get any event emitted when a client aborts or disconnects during a streaming response with awslambda.streamifyResponse. I tried with this code, but from my testing i...
X Description: Im wondering if its possible to get any event emitted when a client aborts or disconnects during a streaming response with awslambda.streamifyResponse. I tried with this code, but from my testing i...
Opengraph URL: https://github.com/aws/aws-lambda-nodejs-runtime-interface-client/issues/145
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Event on client disconnect/abort in a streaming response","articleBody":"Im wondering if its possible to get any event emitted when a client aborts or disconnects during a streaming response with `awslambda.streamifyResponse`. I tried with this code, but from my testing it looks like theres no event emitted on the Lambda when that happens:\n```ts\nexports.handler = awslambda.streamifyResponse(\n async (event, responseStream, context) =\u003e {\n responseStream.setContentType('text/event-stream')\n responseStream.on(\"close\", ()=\u003e {\n // this never gets emitted at any point\n console.log(\"responseStream closed\");\n });\n for (let i = 0; i \u003c 20; i++) {\n await sleep(1000);\n responseStream.write(`event: ping\\n`);\n responseStream.write(`data: ${i}\\n\\n`);\n }\n responseStream.end();\n }\n);\n```\n\nThis would be an awesome feature to add in the age of SSR streaming, LLM's and more.","author":{"url":"https://github.com/sommeeeer","@type":"Person","name":"sommeeeer"},"datePublished":"2025-08-11T08:58:40.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/145/aws-lambda-nodejs-runtime-interface-client/issues/145"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:0ef4c344-2bbc-0886-b876-05d5948fd1b3 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9E22:1166E6:366E18E:4BFF147:6A635965 |
| html-safe-nonce | bc3d91c89c4fdd6e797448a1e665d1ce215bd59f5c10109077e4a924a4a4727c |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5RTIyOjExNjZFNjozNjZFMThFOjRCRkYxNDc6NkE2MzU5NjUiLCJ2aXNpdG9yX2lkIjoiNTU3MTk2NzE5OTIzMjYxMjcwOSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 2805257f00377ca3fdeb214ef2438f7d395e2f1059a9e653e8cf28842c7afe94 |
| hovercard-subject-tag | issue:3309092086 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/aws/aws-lambda-nodejs-runtime-interface-client/145/issue_layout |
| twitter:image | https://opengraph.githubassets.com/6886e7f6a1293badf6bf46c9b3e4f9db66bef29d1ab898cf5a549027e1c0d560/aws/aws-lambda-nodejs-runtime-interface-client/issues/145 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/6886e7f6a1293badf6bf46c9b3e4f9db66bef29d1ab898cf5a549027e1c0d560/aws/aws-lambda-nodejs-runtime-interface-client/issues/145 |
| og:image:alt | Im wondering if its possible to get any event emitted when a client aborts or disconnects during a streaming response with awslambda.streamifyResponse. I tried with this code, but from my testing i... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | sommeeeer |
| hostname | github.com |
| expected-hostname | github.com |
| None | 59e55daad7174ca59d63c6974d58276ccb5477442e550bebb3c035e1bef11c94 |
| turbo-cache-control | no-preview |
| go-import | github.com/aws/aws-lambda-nodejs-runtime-interface-client git https://github.com/aws/aws-lambda-nodejs-runtime-interface-client.git |
| octolytics-dimension-user_id | 2232217 |
| octolytics-dimension-user_login | aws |
| octolytics-dimension-repository_id | 291796346 |
| octolytics-dimension-repository_nwo | aws/aws-lambda-nodejs-runtime-interface-client |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 291796346 |
| octolytics-dimension-repository_network_root_nwo | aws/aws-lambda-nodejs-runtime-interface-client |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 990295d92a4cc7b63fbbd83a046217cd7d77d49c |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width