awslambda: return actual result in sync invoke

Return actual output of the Lambda instead of echoing the input.
This commit is contained in:
Andrey Kislyuk 2020-01-22 16:39:11 -08:00 committed by GitHub
parent b54d3b5a11
commit 5ba786d97a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -472,7 +472,7 @@ class LambdaFunction(BaseModel):
payload["result"] = response_headers["x-amz-log-result"]
result = res.encode("utf-8")
else:
result = json.dumps(payload)
result = res
if errored:
response_headers["x-amz-function-error"] = "Handled"