Skip to content
Advertisement

AWS Lambda function handler missing

I created the following lambda function and its given me the following error. I am new to Python and I dont think there’s anything missing in the function. can someone please help to make this function work? Thanks

JavaScript

Execution result

JavaScript

Advertisement

Answer

Very simple. Rename handler to lambda_handler, or change your lambda configuration to use the handler called handler rather than lambda_handler. There were comments that mentioned this, but no simple answer given.

There is no good reason to nest the function as the other answer seems to suggest.

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement