Stream Amazon Bedrock completions via AWS AppSync subscriptions

AWS AppSync → AWS Lambda → Amazon Bedrock

Use AppSync subscriptions to interact with Bedrock models.

This pattern takes a prompt that will be used to invoke an Amazon Bedrock model from via a Lambda resolver.
The model's completions will be sent via an AppSync Subscription, to which the client can subscribe by providing the corresponding Chat ID.

< 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-bedrock-subscriptions-cdk

Deploy

npm run deploy


Testing

npm run test

Cleanup

cdk destroy

Created by:

Gabriele Biagini

Gabriele Biagini

Solutions Architect @ AWS

Follow on LinkedIn