Skip to content

ParnabBasak/lambda-bedrock-integration

Repository files navigation

Serverless Bedrock Integration

This sample repository has sample code to integrate AWS Lambda with Amazon Bedrock.

AWS Services used:

  1. AWS Lambda
  2. AWS SAM

The following Lambda Language Runtimes are supported:

Language Runtime Version AWS SDK Version
.NET v6.0 3.7.201.5
Java v17 2.20.157
NodeJS v18 3.428.0
Python v3.11 1.28.57

Deployment Architecture

Serverless Bedrpck Integration architecture

Warning This application is not ready for production use. It was written for demonstration and educational purposes. Review the Security section of this README and consult with your security team before deploying this stack. No warranty is implied in this example.

Deployment Instructions

Prerequisites

Cloning the repository

Clone this repository:

git clone git@github.com:ParnabBasak/lambda-bedrock-integration.git

Amazon Bedrock setup

This application can be used with a variety of LLMs via Amazon Bedrock. See Supported models in Amazon Bedrock for a complete list.

By default, this application uses Anthropic Claude v2 to generate responses. You can change that to other Amazon Bedrock supported FMs.

Important Before you can use these models with this application, you must request access in the Amazon Bedrock console. See the Model access section of the Bedrock User Guide for detailed instructions. By default, this application is configured to use Amazon Bedrock in the supported Region. Make sure you request model access in that Region (this does not have to be the same Region that you deploy this stack to).

Implementing language specific code

The respective named sub directories have the detailed instructions to deploy the AWS SAM application. Navigate to your preferred language runtime and follow the instructions there.

cd ~/<Your Preferred Language Runtime>/lambda-bedrock-app/

License

This library is licensed under the MIT-0 License. See the LICENSE file.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published