Getting Langchain to work in Lambda required building a custom layer. Given that Langchain is moving quickly, I want to have a way to build the latest version of Langchain as needed.
First, make sure Docker is running. Then run runner.sh
to generate Python.zip
file. Then upload to AWS Lambda environment:
In the future, you can update requirements.txt
and Dockerfile
to the latest version.
Thanks to Felix Yu for providing the starting guide.