2

I am trying to setup AWS lambda with a python script that has the below structure :

> lambda_function
>       |
>       |-----myappname
>                      |----src
>                              |----util
>                                              |--------helper.py
>                                              |__init__.py
>                              |---lambda_handler.py
>                              |__init__.py

now when deploy this code in aws lambda with zip , I am getting error

Runtime.ImportModuleError: unable to import module src/lambda_handler : no module name util-folder 

lambda_handler.py

from util.helper import helper

def main(event,context)
    return {"statusCode":200}

helper.py

def sum(a,b)
    return a+b

Updated file name to show correct names that I have used in my main app.

John Rotenstein
  • 241,921
  • 22
  • 380
  • 470

0 Answers0