firebase / firebase/firebase-admin-python

AWS lambda Python functions gives error to install the "google-cloud-firestore" module, but is already installed

Offen
#634 5 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
needs-triage
Vorherrschende Sprache
Python
Sterne
1.2k
Forks
359
Ø Merge
5 T. 6 Min.
Gemergte PRs (30 T.)
2

Beschreibung

Operating System version: AWS Python lambda
Firebase SDK version: firebase-admin 5.2.0
Firebase Product: google cloud firestore
Python version: 3.9

Hi I have an AWS Lambda in Python 3.9 (now regenerated in AWS functions console),I have installed in my local aws folder firebase-admin & dependencies:

```
pip install --target . firebase-admin==5.2.0
```
This installation gives me this error:

![image](https://user-images.githubusercontent.com/35197781/183120276-a1a9647c-d1c8-4353-bd4d-21ed888455de.png)

And finally I have implemented my Python AWS lambda, and upload to AWS lambda as ZIP file a package to the AWS code function console. 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
```
And finally upload all my directory in a package to the AWS function console.

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.", ....
}
```
This is my full directory:

![image](https://user-images.githubusercontent.com/35197781/183119877-e42d368b-0116-4e0d-9963-99f740fa2908.png)

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

Thanks!

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.