Skip to content

Commit

Permalink
fix: Lambda response format is not valid for api gateway
Browse files Browse the repository at this point in the history
  • Loading branch information
krzysiekb committed Dec 29, 2023
1 parent a372193 commit d33654b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions backend/lambda/backend_lambda.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,13 @@ def handler(event, context):
output_message = response_body.get('results')[0].get('outputText')

return {
'isBase64Encoded': False,
'statusCode': 200,
'headers': {
'Content-Type': 'application/json'
},
'body': {
'body': json.dumps({
'inputMessage': input_message,
'outputMessage': output_message,
}
})
}

0 comments on commit d33654b

Please sign in to comment.