[{"data":1,"prerenderedAt":65},["ShallowReactive",2],{"pattern-appsync-lambda-bedrock-async-stream-subscription-cdk":3},{"id":4,"title":5,"architectureURL":6,"cleanup":7,"contributors":10,"deploy":12,"description":15,"extension":16,"framework":17,"gitHub":18,"highlight":6,"introBox":24,"language":30,"level":31,"meta":32,"patternArch":33,"resources":52,"s3URL":6,"services":6,"stem":60,"testing":61,"videoId":6,"__hash__":64},"patterns\u002Fpatterns\u002Fappsync-lambda-bedrock-async-stream-subscription-cdk.json","Amazon Bedrock calls via AWS AppSync & AWS Lambda streaming for long tasks",null,{"text":8},[9],"Delete the stack: \u003Ccode>cdk destroy --all\u003C\u002Fcode>.",[11],"content\u002Fcontributors\u002Fkaustav-dey.json",{"text":13},[14],"cdk deploy","Asynchronous streaming pattern using AWS AppSync subscriptions with Lambda to stream Amazon Bedrock responses to clients via WebSocket.","json","AWS CDK",{"template":19},{"repoURL":20,"templateURL":21,"projectFolder":22,"templateFile":23},"https:\u002F\u002Fgithub.com\u002Faws-samples\u002Fserverless-patterns\u002Ftree\u002Fmain\u002Fappsync-lambda-bedrock-async-stream-subscription-cdk","serverless-patterns\u002Fappsync-lambda-bedrock-async-stream-subscription-cdk","appsync-lambda-bedrock-async-stream-subscription-cdk","\u002Flib\u002Fappsync-lambda-bedrock-async-stream-subscription-cdk-stack.ts",{"headline":25,"text":26},"How it works",[27,28,29],"The pattern implements an asynchronous streaming architecture.","Client initiates a WebSocket subscription and makes a request to AWS AppSync. AppSync invokes Lambda function in event mode, enabling asynchronous processing.","Lambda function streams responses from Amazon Bedrock using ConverseStream. Lambda function sends updates via mutations to AppSync. Updates are delivered to client through WebSocket subscription.","TypeScript","300",{},{"icon1":34,"icon2":39,"icon3":42,"line1":46,"line2":50},{"x":35,"y":36,"service":37,"label":38},20,50,"appsync","AWS AppSync",{"x":36,"y":36,"service":40,"label":41},"lambda","AWS Lambda",{"x":43,"y":36,"service":44,"label":45},80,"bedrock","Amazon Bedrock",{"from":47,"to":48,"label":49},"icon1","icon2","",{"from":48,"to":51,"label":49},"icon3",{"bullets":53},[54,57],{"text":55,"link":56},"AWS AppSync JavaScript resolver and function reference for Amazon Bedrock runtime","https:\u002F\u002Fdocs.aws.amazon.com\u002Fappsync\u002Flatest\u002Fdevguide\u002Fresolver-reference-bedrock-js.html#long-running-invocations",{"text":58,"link":59},"Bedrock ConverseStream API","https:\u002F\u002Fdocs.aws.amazon.com\u002Fbedrock\u002Flatest\u002FAPIReference\u002FAPI_runtime_ConverseStream.html","patterns\u002Fappsync-lambda-bedrock-async-stream-subscription-cdk",{"text":62},[63],"See the GitHub repo for detailed testing instructions.","_xuyzIUeka3DHDeOe5je_rxr61cMQCBmNSwKAhi6Reg",1778846883283]