Skip to content

Commit 6fff67d

Browse files
authored
Create appsync-ws-lambda-bedrock-sam.json
1 parent 8a71790 commit 6fff67d

File tree

1 file changed

+100
-0
lines changed

1 file changed

+100
-0
lines changed
Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
{
2+
"title": "AI Chat with AWS AppSync (WebSockets), AWS Lambda, and Amazon Bedrock",
3+
"description": "WebSocket-Enabled AI Chat Using AWS Services.",
4+
"language": "",
5+
"level": "200",
6+
"framework": "AWS SAM",
7+
"introBox": {
8+
"headline": "How it works",
9+
"text": [
10+
"This AI chat application works through a simple request-response flow.",
11+
"A client sends a GraphQL mutation to the AWS AppSync API endpoint.",
12+
"AWS AppSync then routes the request to a AWS Lambda function via the configured data source and resolver.",
13+
"The AWS Lambda function receives the user's input message, constructs a properly formatted request for Amazon Bedrock's Claude model (including the Anthropic API version, token limit, and user message).",
14+
"Then sends it to Amazon Bedrock using the AWS SDK, waits for the AI response, and returns the generated text back to AWS AppSync. ",
15+
"AWS AppSync then delivers this response to the client, while the subscription feature enables real-time notifications to connected clients when new responses are available, creating an interactive chat experience where users can send messages and receive AI-generated replies in real-time."
16+
]
17+
},
18+
"gitHub": {
19+
"template": {
20+
"repoURL": "https://github.com/aws-samples/serverless-patterns/tree/main/appsync-ws-lambda-bedrock-sam",
21+
"templateURL": "serverless-patterns/appsync-ws-lambda-bedrock-sam",
22+
"projectFolder": "appsync-ws-lambda-bedrock-sam",
23+
"templateFile": "template.yml"
24+
}
25+
},
26+
"resources": {
27+
"bullets": [
28+
{
29+
"text": "AWS AppSync",
30+
"link": "https://aws.amazon.com/appsync/"
31+
},
32+
{
33+
"text": "AWS AppSync WebSocket",
34+
"link": "https://docs.aws.amazon.com/appsync/latest/devguide/aws-appsync-real-time-data.html"
35+
},
36+
{
37+
"text": "AWS Lambda",
38+
"link": "https://aws.amazon.com/lambda/"
39+
},
40+
{
41+
"text": "Amazon Bedrock",
42+
"link": "https://aws.amazon.com/bedrock/"
43+
}
44+
]
45+
},
46+
"deploy": {
47+
"text": [
48+
"sam deploy"
49+
]
50+
},
51+
"testing": {
52+
"text": [
53+
"See the GitHub repo for detailed testing instructions."
54+
]
55+
},
56+
"cleanup": {
57+
"text": [
58+
"<code>sam delete</code>"
59+
]
60+
},
61+
"authors": [
62+
{
63+
"name": "Mike Hume",
64+
"image": "https://media.licdn.com/dms/image/D4E03AQEiUfmBiUOw_A/profile-displayphoto-shrink_200_200/0/1718324029612?e=1727308800&v=beta&t=ybhm76l-CP5xcUsHbdq2IaJOlfyycvQ6gNwuCSd3Z0w",
65+
"bio": "AWS Senior Solutions Architect & UKPS Serverless Lead.",
66+
"linkedin": "michael-hume-4663bb64",
67+
"twitter": ""
68+
}
69+
],
70+
"patternArch": {
71+
"icon1": {
72+
"x": 10,
73+
"y": 50,
74+
"service": "appsync",
75+
"label": "AWS AppSync GraphQL API"
76+
},
77+
"icon2": {
78+
"x": 50,
79+
"y": 50,
80+
"service": "lambda",
81+
"label": "AWS Lambda"
82+
},
83+
"icon3": {
84+
"x": 90,
85+
"y": 50,
86+
"service": "bedrock",
87+
"label": "Amazon Bedrock"
88+
},
89+
"line1": {
90+
"from": "icon1",
91+
"to": "icon2",
92+
"label": ""
93+
},
94+
"line2": {
95+
"from": "icon2",
96+
"to": "icon3",
97+
"label": "Invoke Model"
98+
}
99+
}
100+
}

0 commit comments

Comments
 (0)