Skip to content

Commit

Permalink
Create appsync-lambda-bedrock-async-stream-subscription-cdk.json
Browse files Browse the repository at this point in the history
add pattern json file
  • Loading branch information
marcojahn authored Jan 2, 2025
1 parent 8ec2113 commit 9c7faa0
Showing 1 changed file with 81 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
{
"title": "Amazon Bedrock calls via AppSync & Lambda streaming for long tasks",
"language": "TypeScript",
"level": "300",
"framework": "CDK",
"introBox": {
"headline": "How it works",
"text": [
"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."
]
},
"gitHub": {
"template": {
"repoURL": "https://github.com/aws-samples/serverless-patterns/tree/main/appsync-lambda-bedrock-async-stream-subscription-cdk",
"templateURL": "serverless-patterns/appsync-lambda-bedrock-async-stream-subscription-cdk",
"projectFolder": "appsync-lambda-bedrock-async-stream-subscription-cdk",
"templateFile": "/lib/appsync-lambda-bedrock-async-stream-subscription-cdk-stack.ts"
}
},
"resources": {
"bullets": [
{
"text": "AWS AppSync JavaScript resolver and function reference for Amazon Bedrock runtime",
"link": "https://docs.aws.amazon.com/appsync/latest/devguide/resolver-reference-bedrock-js.html#long-running-invocations"
},
{
"text": "Bedrock ConverseStream API",
"link": "https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_ConverseStream.html"
}
]
},
"deploy": {
"text": ["cdk deploy"]
},
"testing": {
"text": ["See the GitHub repo for detailed testing instructions."]
},
"cleanup": {
"text": ["Delete the stack: <code>cdk destroy --all</code>."]
},
"authors": [
{
"name": "Kaustav Dey",
"image": "https://avatars.githubusercontent.com/u/13236519",
"bio": "Solution Architect at AWS",
"linkedin": "kaustavbecs"
}
],
"patternArch": {
"icon1": {
"x": 20,
"y": 50,
"service": "appsync",
"label": "AWS AppSync"
},
"icon2": {
"x": 50,
"y": 50,
"service": "lambda",
"label": "AWS Lambda"
},
"icon3": {
"x": 80,
"y": 50,
"service": "bedrock",
"label": "Amazon Bedrock"
},
"line1": {
"from": "icon1",
"to": "icon2",
"label": ""
},
"line2": {
"from": "icon2",
"to": "icon3",
"label": ""
}
}
}

0 comments on commit 9c7faa0

Please sign in to comment.