-
Notifications
You must be signed in to change notification settings - Fork 952
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create appsync-lambda-bedrock-async-stream-subscription-cdk.json
add pattern json file
- Loading branch information
Showing
1 changed file
with
81 additions
and
0 deletions.
There are no files selected for viewing
81 changes: 81 additions & 0 deletions
81
...k-async-stream-subscription-cdk/appsync-lambda-bedrock-async-stream-subscription-cdk.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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": "" | ||
} | ||
} | ||
} |