I set sample lambda function as follows to detect what is context.
This function is hooked by API gateway.
import json
def lambda_handler(event, context):
return {
'isBase64Encoded': False,
'statusCode': 200,
'headers': {},
'body': json.dumps(context)
}
And when I send GET request from API gateway it returned as follows
{
"message": "Internal server error"
}
Mon May 24 07:20:58 UTC 2021 : Lambda execution failed with status 200 due to customer function error: Object of type LambdaContext is not JSON serializable. Lambda request id: 32d4e450-576b-4bd6-abb9-d1bd893077ed
Mon May 24 07:20:58 UTC 2021 : Method completed with status: 502
context is not json format ? How can I see context in handler ?
If someone has opinion,please let me know
Thanks