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,180 points
17,622 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,220 points

selected Dec 15, 2020 by akhtar

Related Questions In AWS

+1 vote
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
+1 vote
1 answer

'No module named 'requests'' on the AWS Python Lambda function?

Hi@akhtar, According to my knowledge requests is not ...READ MORE

answered Apr 15, 2020 in AWS by MD
• 95,220 points
7,039 views