In general, lambda returns JSON but the lambda interface now keeps the raw data and it could provide accessors to parse the data rather than duplicate it in many attributes. The lambda_func.content and lambda_func.error could be accessors that read the data and response as required.
The .content could be a property that basically does the JSON parsing on demand:
Maybe the .content should be renamed to .json instead.
If a lambda function returns a response with binary data (check content-type), the API should be able to detect it and parse it into binary content (image, protobuf, etc).
In general, lambda returns JSON but the lambda interface now keeps the raw data and it could provide accessors to parse the data rather than duplicate it in many attributes. The
lambda_func.content
andlambda_func.error
could be accessors that read thedata
andresponse
as required.The
.content
could be a property that basically does the JSON parsing on demand:Maybe the
.content
should be renamed to.json
instead.If a lambda function returns a response with binary data (check content-type), the API should be able to detect it and parse it into binary content (image, protobuf, etc).