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

0 votes

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 in AWS by akhtar
• 11,270 points
511 views

1 answer to this question.

0 votes

Hi@akhtar,

This error appears when you haven’t named your code file or function right. 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 by MD
• 24,500 points

Related Questions In AWS

+1 vote
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
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 in AWS by MD
• 24,500 points
512 views
0 votes
1 answer

ImportError: No module named 'awscli'

Hi@akhtar, To install aws cli in your system, ...READ MORE

answered Apr 27 in AWS by MD
• 24,500 points
68 views