AWS Lambda to Amazon Bedrock

AWS Lambda → Amazon Bedrock

AWS Lambda function to infer foundation models in Amazon Bedrock.

This sample project shows how to use an AWS Lambda function to infer foundational models in Bedrock. The function is invoked with a JSON payload to infer the desired foundation model and it will return Bedrock response with an execution time to evaluate different models performances.

< Back to all patterns

GitHub icon Download this pattern (.zip)

GitHub icon View this pattern on GitHub


Clone repo

git clone https://github.com/aws-samples/serverless-patterns/cd serverless-patterns/lambda-bedrock-cdk

Deploy

cdk deploy


Testing

See the GitHub repo for detailed testing instructions.

Cleanup

Delete the stack: cdk delete.

Created by:

Max Berta

Max Berta

Startup Solution Architect at AWS

Follow on LinkedIn