Build a Serverless GenAI solution with Lambda, DynamoDB, LangChain and Amazon Bedrock

This page summarizes the projects mentioned and recommended in the original post on dev.to

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • langchaingo

    LangChain for Go, the easiest way to write LLM-based programs in Go

  • This use-case here is a similar one - a chat application. I will switch back to implementing things in Go using langchaingo (I used Python for the previous one) and continue to use Amazon Bedrock. But there are few unique things you can explore in this blog post:

  • Gin

    Gin is a HTTP web framework written in Go (Golang). It features a Martini-like API with much better performance -- up to 40 times faster. If you need smashing performance, get yourself some Gin.

  • Thanks to the AWS Lambda Web Adapter, the application built as a (good old) REST/HTTP API using a familiar library (in this case, Gin.

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • langchaingo-dynamodb-chat-history

    Chat history (memory) implementation for LangChain based on DynamoDB

  • Using DynamoDB as the backend store history: Refer to the GitHub repository if you are interested in the implementation. To summarize, I implemented the required functions of the schema.ChatMessageHistory.

  • aws-lambda-web-adapter

    Run web applications on AWS Lambda

  • Thanks to the AWS Lambda Web Adapter, the application built as a (good old) REST/HTTP API using a familiar library (in this case, Gin.

  • git clone https://github.com/abhirockzz/chatbot-bedrock-dynamodb-lambda-langchain cd chatbot-bedrock-dynamodb-lambda-langchain

  • aws-lambda-go-api-proxy

    lambda-go-api-proxy makes it easy to port APIs written with Go frameworks such as Gin (https://gin-gonic.github.io/gin/ ) to AWS Lambda and Amazon API Gateway.

  • I really like the extensibility of LangChain. While I understand that langchaingo may not be as popular as the original python version (I hope it will reach there in due time 🤞), but it's nice to be able to use it as a foundation and build extensions as required. Previously, I had written about how to use the AWS Lambda Go Proxy API to run existing Go applications on AWS Lambda. The AWS Lambda Web Adapter offers similar functionality but it has lots of other benefits, including response streaming and the fact that it is language agnostic.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts