Stream Amazon Bedrock completions via AWS AppSync Events API

Amazon API Gateway → AWS Lambda → Amazon Bedrock

Leverage AppSync Events API to stream completions from Amazon Bedrock.

In this pattern the end user is able to provide a prompt that will be used to invoke an Amazon Bedrock model from via a Lambda middleware.
The client will receive the model's completions through WebSocket provided by AppSync Events.

< 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/appsync-events-bedrock-cdk

Deploy

npm run deploy


Testing

npm run test

Cleanup

cdk destroy

Created by:

Gabriele Biagini

Gabriele Biagini

Solutions Architect @ AWS

Follow on LinkedIn