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 réponses
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
EXPERT
répondu il y a 4 mois
  • 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
EXPERT
répondu il y a 4 mois

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions