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
These imports don't work locally, presumably due to the way that python-lambda-local calls the handler as a function directly? So locally, we're using the following boilerplate in each handler we need to directly call:
if__name__[:8] in ['__main__', 'request-'] andnot__package__:
importosimportsys__package__='package_one'sys.path.append(...)
Are we missing something obvious here, or would a PR be welcomed to either inject this boilerplate automatically, or have python-lamba-local call the handler from within a package as AWS Lambda does itself?
The text was updated successfully, but these errors were encountered:
We're currently running multi-package code on AWS Lambda, eg:
On AWS Lambda, we're able to use:
These imports don't work locally, presumably due to the way that
python-lambda-local
calls the handler as a function directly? So locally, we're using the following boilerplate in each handler we need to directly call:Are we missing something obvious here, or would a PR be welcomed to either inject this boilerplate automatically, or have
python-lamba-local
call the handler from within a package as AWS Lambda does itself?The text was updated successfully, but these errors were encountered: