langchain module Giving error in AWS Lambda

0

from langchain.retrievers import AmazonKendraRetriever from langchain.retrievers import AmazonKendraRetriever from langchain.chains import ConversationalRetrievalChain from langchain.prompts import PromptTemplate from langchain.llms.bedrock import Bedrock

while Importing this all module in AWS Lambda getting error

Response { "errorMessage": "Unable to import module 'lambda_function': No module named 'orjson.orjson'", "errorType": "Runtime.ImportModuleError", "stackTrace": [] }

1 Answer
0

Hi,

Maybe you are in the same situation as https://github.com/langchain-ai/langchain/issues/6333 ?

If yes, the solution is provided in the ticket.

More generally, this KC article will help you fix import issues with Lambda: https://repost.aws/knowledge-center/lambda-import-module-error-python

Best,

Didier

profile pictureAWS
EXPERT
answered 2 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions