Skip to content
This repository was archived by the owner on Mar 15, 2026. It is now read-only.
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

Closed

Description

@Ghopper21

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

  1. kadrach commented on Mar 17, 2017

    @kadrach

    As a workaround, you can set (or append) your PYTHONPATH, e.g. PYTHONPATH=$(pwd) lambda invoke should work.

  2. added a commit that references this issue on Jun 3, 2017
  3. jmeekhof commented on Jun 7, 2017

    @jmeekhof
    Collaborator

    The code to allow this to work has been merged into master. It'll be available next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions