Lambda functions handler is invalid - No module named lambda_function
vorotech opened this issue · 1 comments
vorotech commented
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:
- 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 - Zip packages without including parent folder - I think this way it was planned.
@santiagocardenas might be related to your last commit
santiagocardenas commented