I am getting a 500 Internal Server Error with the following code in an AWS Lambda function and I cannot figure out why. The python code runs fine locally without any exceptions.
def lambda_handler (event, context):
return {
"statusCode": 200,
'headers': {
'Access-Control-Allow-Headers': 'Content-Type',
'Access-Control-Allow-Origin': '*',
'Access-Control-Allow-Methods': 'OPTIONS,POST,GET'
},
"body": [],
}