1
votes

I am deploying a Lambda function (Python 3.6) named lambda_handler using CloudFormation by specifying the code in-line as described here.

The Lambda deploys properly, however when testing the function I see a "Bad Handler" exception.

What is the correct way to refer to the handler when passing the Handler parameter to Lambda?

1

1 Answers

5
votes

Use the handler index.lambda_handler. Since there is no deployment package name when submitting in-line code via ZipFile, the prefix index is used instead.