Amazon Bedrock streaming with AWS AppSync

AWS AppSync → AWS Lambda → Amazon Bedrock

Stream Amazon Bedrock responses with AWS AppSync

This template creates an AWS AppSync API along with an AWS Lambda function. The API exposes a mutation that asynchronously invokes the Lambda function (thus bypassing the 30s timeout of AppSync) that calls Anthropic Claude V3 Haiku through Amazon Bedrock and streams the response back to the end user through an AppSync subscription.

< 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 appsync-bedrock-streaming-sam

Deploy

sam deploy


Testing

See the Github repo for detailed testing instructions.

Cleanup

Delete the stack: sam delete.

Created by:

Alexis Philippart de Foy

Alexis Philippart de Foy

I am a Startup Solutions Architect, Serverless Enthusiast and former startup founder.

Follow on LinkedIn