Importing Python Module "pulp" On Amazon Aws Lambda
Solution 1:
Follow the instructions on http://docs.aws.amazon.com/lambda/latest/dg/lambda-python-how-to-create-deployment-package.html
On how to deploy to AWS lambda using virtualenv.
Solution 2:
The error is a standard Python error saying that it will only import things from the standard locations. Since that includes the current directory you should be good but your code includes
from . import pulp
when you have pulp.py in your directory. If pulp.py was all that was needed you would be fine. But pulp.py wants to import .constants
. That is a relative reference which would be fine since it is supposed to be in a module. In your case it is not fine. If you want to keep going on this path you will have to go through and remove these relative imports.
Also your .zip file includes .pyc files. Let these be generated on the target machine. Just send your .py's that they came from.
Post a Comment for "Importing Python Module "pulp" On Amazon Aws Lambda"