You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 15, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Mar 15, 2026. It is now read-only.
Import of local modules from the main module doesn't work when invoking #31
I have a lambda that imports a local module (i.e. another Python file in the same folder as the main lambda module, as opposed to a pip installed package). Doing a lambda deploy works, and the resulting lambda on AWS works also. However, when I do lambda invoke for local testing, I get an ImportError: No module named foo where foo is the module I'm trying to import.
Activity
kadrach commentedon Mar 17, 2017
As a workaround, you can set (or append) your
PYTHONPATH, e.g.PYTHONPATH=$(pwd) lambda invokeshould work.Issue #31
jmeekhof commentedon Jun 7, 2017
The code to allow this to work has been merged into master. It'll be available next release.
Merge branch 'master' of github.com:nficano/python-lambda