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回答
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
エキスパート
回答済み 4ヶ月前
  • 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
エキスパート
回答済み 4ヶ月前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ