Unable to import module lambda function No module named lambda function

+1 vote

Hi Guys,

I created one lambda function using python. But I am getting this below error at the time of running.

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

How can I solve this error?

Apr 28, 2020 in AWS by akhtar
• 38,240 points
49,803 views

1 answer to this question.

+1 vote
Best answer

Hi@akhtar,

This error appears when you haven’t named your code file or function correctly. You need to go to Lambda -> Functions -> Your Function -> Configuration and check the value in the Handler field.

The format should be fileName.handlerMethod.

Hope this will solve your error.

answered Apr 28, 2020 by MD
• 95,440 points

selected Dec 15, 2020 by akhtar