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
The json encoder in LambdaMarshaller.marshall_response turns unicode characters into unicode escape sequences (i.e. \u0123) instead of regular unicode characters.
As a result, a unicode character contributes 6 bytes to the response size of the lambda instead of 2 bytes like a normal unicode character. The runtime interface clients for other languages (Ruby and NodeJS) do not produce unicode escape sequences. In the hypothetical case of a lambda that returns all unicode characters, a Ruby or NodeJS lambda function could return 3x as much data as a Python lambda function.
The json encoder in
LambdaMarshaller.marshall_response
turns unicode characters into unicode escape sequences (i.e.\u0123
) instead of regular unicode characters.aws-lambda-python-runtime-interface-client/awslambdaric/lambda_runtime_marshaller.py
Line 52 in 970e9c1
As a result, a unicode character contributes 6 bytes to the response size of the lambda instead of 2 bytes like a normal unicode character. The runtime interface clients for other languages (Ruby and NodeJS) do not produce unicode escape sequences. In the hypothetical case of a lambda that returns all unicode characters, a Ruby or NodeJS lambda function could return 3x as much data as a Python lambda function.
https://github.com/aws/aws-lambda-ruby-runtime-interface-client/blob/bbb95b2563344cef651828bd19e72de091d9a470/lib/aws_lambda_ric/aws_lambda_marshaller.rb#L32
https://github.com/aws/aws-lambda-nodejs-runtime-interface-client/blob/9591537e98806494617281a362dbdc33b3853680/src/RuntimeClient/RuntimeClient.ts#L243
The text was updated successfully, but these errors were encountered: