I have a Python app that uses Google Cloud Pubsub, like this:
from google.cloud import pubsub
It works fine locally, but on calling the AWS Lambda function I get:
Unable to import module 'handler': cannot import name 'pubsub'
and no other error or details.
My requirements.txt file:
requests
google-cloud-datastore==1.4.0
google-cloud-pubsub==0.29.0
sqlalchemy
I have a feeling it may be do to the psutil requirement of pubsub, as when I try to import psutil before pubsub, I get this error:
Unable to import module 'handler': cannot import name '_psutil_linux'