1

Hi I have an AWS Lambda in Python 3.9 (now regenerated in AWS functions console),I have installed in my aws folder:

pip install --target . firebase-admin

And finally I have implemented my Python AWS lambda, and upload to AWS lambda as ZIP file a package. When I tried to execute my testing in the Python Lambda, this gives me this error:

{
  "errorMessage": "Unable to import module 'lambda_function': Failed to import the Cloud Firestore library for Python. Make sure to install the \"google-cloud-firestore\" module.",
  "errorType": "Runtime.ImportModuleError",
  "stackTrace": []
}

I also installed in my local directory the grpcio module, before to upload ZIP file in AWS function console, with this command:

pip install --target . grpcio

But the same error is displayed when I execute a test in AWS cloud function.

{
  "errorMessage": "Unable to import module 'lambda_function': Failed to import the Cloud Firestore library for Python. Make sure to install the \"google-cloud-firestore\" module.", ....
}

What can I do to solve this error? & made available google-cloud-firestore works fine in my AWS Lambda Python?

Thanks

Ani Alamo
  • 11
  • 2
  • Do not zip the folder, just zip the contents of it alone. Ex: cd lambda_code/ and then zip * and upload the zip – omuthu Aug 04 '22 at 14:44
  • Yes! Inside the folder! I zip * all files & folders and this ZIP I uploaded to AWS lambda function, but always gives me the same error "Failed to import the Cloud Firestore library for Python." – Ani Alamo Aug 04 '22 at 14:47
  • Does this answer your question? [ImportError: Failed to import the Cloud Firestore library for Python](https://stackoverflow.com/questions/48264536/importerror-failed-to-import-the-cloud-firestore-library-for-python) – omuthu Aug 04 '22 at 17:42
  • No! This answer https://stackoverflow.com/questions/48264536/importerror-failed-to-import-the-cloud-firestore-library-for-python does not work in my AWS. Always says Failed to import the Cloud Firestore library for Python. Make sure to install the \"google-cloud-firestore\" module." – Ani Alamo Aug 05 '22 at 15:33
  • 1
    did you ever find a solution, currently encountering the same issue. – Zizi96 Aug 26 '22 at 14:40

0 Answers0