You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
AWS introduced response streaming for Node Lambda functions in 2023. Our agent's Lambda instrumentation throws errors when customers wrap these, because the argument order (event, responseStream, context) is different from the traditional functions we instrument (event, context, callback).
We can use the presence of this property to detect automatically if the handler is intended to stream a response, and wrap it accordingly, with no additional input needed from the customer.
Acceptance Criteria
This spike should either add response streaming support, or at least determine the scale of any blockers.
The text was updated successfully, but these errors were encountered:
Description
AWS introduced response streaming for Node Lambda functions in 2023. Our agent's Lambda instrumentation throws errors when customers wrap these, because the argument order (event, responseStream, context) is different from the traditional functions we instrument (event, context, callback).
The
.streamifyResponse
method is defined for the Lambda execution environment, on the globalawslambda
object. When invoked, it returns the original handler function, with an additional symbol added as a property. See https://github.com/aws/aws-lambda-nodejs-runtime-interface-client/blob/main/src/UserFunction.js#L204-L213 ; the symbol isaws.lambda.runtime.handler.streaming
.We can use the presence of this property to detect automatically if the handler is intended to stream a response, and wrap it accordingly, with no additional input needed from the customer.
Acceptance Criteria
This spike should either add response streaming support, or at least determine the scale of any blockers.
The text was updated successfully, but these errors were encountered: