Error while running python code in aws lambda function:

0

While running aws lambda function for a lex document based chatbot code i am getting error(i have imported a layer for langchain module).

Error:

Response { "errorMessage": "Unable to import module 'lambda_function': urllib3 v2 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with 'OpenSSL 1.0.2k-fips 26 Jan 2017'. See: https://github.com/urllib3/urllib3/issues/2168", "errorType": "Runtime.ImportModuleError", "stackTrace": [] }

2 Risposte
0

Hi,

Specifying your dependencies in requirements.txt is not sufficient.

Lambda runtime supplies a limited set of 3rd-party Python packages. You have to add the missing ones by yourself.

Follow this guidance to do it for urllib3: https://docs.aws.amazon.com/lambda/latest/dg/python-package.html

Best,

Didier

profile pictureAWS
ESPERTO
con risposta 4 mesi fa
  • I have already added python packages from layers, last i did for langchain module after that i am getting error.

0

Hello.

Please try creating a layer by specifying "urllib3==1.26.15" in "requirements.txt" as described in the GitHub issue below.
https://github.com/lithops-cloud/lithops/issues/1104

profile picture
ESPERTO
con risposta 4 mesi fa

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande