aws-quickstart/quickstart-git2s3

Lambda functions handler is invalid - No module named lambda_function

vorotech opened this issue · 1 comments

This is a critical error. ZipDl lambda function add a folowing log entry when executed:

Unable to import module 'lambda_function': No module named lambda_function

This is happening, because source\lambda.zip contains the folder ZipDl which includes file lambda_function.py. But CloudFormation when creates Lambdas sets the Handler to be lambda_function.lambda_handler.

There are two options to fix this:

  1. Edit each of the Lambdas via AWS Console and set Handler to be ZipDl/lambda_function.lambda_handler (use proper lambda fucntion name as a folder) - This is a workaround I'm currently using
  2. Zip packages without including parent folder - I think this way it was planned.

@santiagocardenas might be related to your last commit

Thank you for reporting this!

I've fixed it in d492a77. It was originally broken by b0c8162.