1

Because Google Functions does not support Python, I was hoping to use google-cloud-datastore in AWS Lambda but hit the same error as AWS Lambda to Firestore error: cannot import name 'cygrpc'

  1. google-cloud-storage works just fine in Lambda so core packaging is not the issue but could pip'ing datastore miss some dependencies ?

  2. setting env.var GOOGLE_CLOUD_DISABLE_GRPC=true does not help as error occurs at import itself. I wonder if this is not a design flaw: you would want to import any gRPC-related libs only if enabled (which is the default). Seems cygprc is being loaded regardless.

  3. I could try downgrade the datastore module to a version which only supported the http api but not sure which one - and that would require most likely to change storage version too

If we managed to get datastore lib to work, our next attempt will be bigquery - should work as doesn't use gRPC (yet?)

yan-hic
  • 1,374
  • 11
  • 26
  • 1
    Did you ever figure out this issue? – Greg Svitak Jun 15 '18 at 19:13
  • 1
    Sorry for delay. We have skipped datastore and set metadata on the blobs to pass along information. Besides, Google Function now supports Python runtime so we plan on migrating. – yan-hic Sep 20 '18 at 06:18

0 Answers0