Skip to content

Commit 9c7faa0

Browse files
authored
Create appsync-lambda-bedrock-async-stream-subscription-cdk.json
add pattern json file
1 parent 8ec2113 commit 9c7faa0

File tree

1 file changed

+81
-0
lines changed

1 file changed

+81
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
{
2+
"title": "Amazon Bedrock calls via AppSync & Lambda streaming for long tasks",
3+
"language": "TypeScript",
4+
"level": "300",
5+
"framework": "CDK",
6+
"introBox": {
7+
"headline": "How it works",
8+
"text": [
9+
"The pattern implements an asynchronous streaming architecture.",
10+
"Client initiates a WebSocket subscription and makes a request to AWS AppSync. AppSync invokes Lambda function in event mode, enabling asynchronous processing.",
11+
"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."
12+
]
13+
},
14+
"gitHub": {
15+
"template": {
16+
"repoURL": "https://github.com/aws-samples/serverless-patterns/tree/main/appsync-lambda-bedrock-async-stream-subscription-cdk",
17+
"templateURL": "serverless-patterns/appsync-lambda-bedrock-async-stream-subscription-cdk",
18+
"projectFolder": "appsync-lambda-bedrock-async-stream-subscription-cdk",
19+
"templateFile": "/lib/appsync-lambda-bedrock-async-stream-subscription-cdk-stack.ts"
20+
}
21+
},
22+
"resources": {
23+
"bullets": [
24+
{
25+
"text": "AWS AppSync JavaScript resolver and function reference for Amazon Bedrock runtime",
26+
"link": "https://docs.aws.amazon.com/appsync/latest/devguide/resolver-reference-bedrock-js.html#long-running-invocations"
27+
},
28+
{
29+
"text": "Bedrock ConverseStream API",
30+
"link": "https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_ConverseStream.html"
31+
}
32+
]
33+
},
34+
"deploy": {
35+
"text": ["cdk deploy"]
36+
},
37+
"testing": {
38+
"text": ["See the GitHub repo for detailed testing instructions."]
39+
},
40+
"cleanup": {
41+
"text": ["Delete the stack: <code>cdk destroy --all</code>."]
42+
},
43+
"authors": [
44+
{
45+
"name": "Kaustav Dey",
46+
"image": "https://avatars.githubusercontent.com/u/13236519",
47+
"bio": "Solution Architect at AWS",
48+
"linkedin": "kaustavbecs"
49+
}
50+
],
51+
"patternArch": {
52+
"icon1": {
53+
"x": 20,
54+
"y": 50,
55+
"service": "appsync",
56+
"label": "AWS AppSync"
57+
},
58+
"icon2": {
59+
"x": 50,
60+
"y": 50,
61+
"service": "lambda",
62+
"label": "AWS Lambda"
63+
},
64+
"icon3": {
65+
"x": 80,
66+
"y": 50,
67+
"service": "bedrock",
68+
"label": "Amazon Bedrock"
69+
},
70+
"line1": {
71+
"from": "icon1",
72+
"to": "icon2",
73+
"label": ""
74+
},
75+
"line2": {
76+
"from": "icon2",
77+
"to": "icon3",
78+
"label": ""
79+
}
80+
}
81+
}

0 commit comments

Comments
 (0)