AWS Lambda to Amazon Bedrock

AWS Lambda → Amazon Bedrock

Connecting to Amazon bedrock from AWS Lambda using the Node.js SDK

This pattern shows how to make use of Bedrock within a Lambda function on Node.js runtime.
The business logic is in ./src/index.js. You can use sample payloads stored in ./events to test the function.

< 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/bedrock-lambda-nodejs

Deploy

sam buildsam deploy --guided


Testing

See the GitHub repo for detailed testing instructions.

Cleanup

Delete the stack: sam delete.

Created by:

Giuseppe Battista

Giuseppe Battista

Giuseppe Battista is a Senior Solutions Architect at Amazon Web Services. He leads soultions architecture for Early Stage Startups in UK and Ireland. He hosts the Twitch Show "Let's Build a Startup" on twitch.tv/aws and he's head of Unicorn's Den accelerator.

Follow on LinkedIn