Skip to content

Commit 6f4c7a0

Browse files
authored
publishing file
1 parent 0c7b764 commit 6f4c7a0

File tree

1 file changed

+93
-0
lines changed

1 file changed

+93
-0
lines changed
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
{
2+
"title": "Streaming Amazon Bedrock response with Amazon API Gateway",
3+
"description": "Stream an Amazon Bedrock LLM response with API Gateway WebSocket API and AWS Lambda function .",
4+
"language": "Rust",
5+
"level": "200",
6+
"framework": "CDK",
7+
"introBox": {
8+
"headline": "How it works",
9+
"text": [
10+
"This pattern establishes a WebSocket connection to Amazon API Gateway. When requests are made to this API, API Gateway routes them to an AWS Lambda function.",
11+
"The Lambda function then initiates a streaming request to Amazon Bedrock using the ConverseStream API. This allows the response from the LLM in Bedrock to start streaming back to the Lambda function as soon as generation begins, without waiting for the entire response to be ready."
12+
]
13+
},
14+
"gitHub": {
15+
"template": {
16+
"repoURL": "https://github.com/aws-samples/serverless-patterns/tree/main/apigw-websocket-api-bedrock-streaming-rust-cdk",
17+
"templateURL": "serverless-patterns/apigw-websocket-api-bedrock-streaming-rust-cdk",
18+
"projectFolder": "apigw-websocket-api-bedrock-streaming-rust-cdk",
19+
"templateFile": "cdk/lib/bedrock-streamer-stack.ts"
20+
}
21+
},
22+
"resources": {
23+
"bullets": [
24+
{
25+
"text": "Working with WebSocket APIs",
26+
"link": "https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api.html"
27+
},
28+
{
29+
"text": "Amazon Bedrock",
30+
"link": "https://aws.amazon.com/bedrock/"
31+
},
32+
{
33+
"text": "Cloud Development Kit",
34+
"link": "https://docs.aws.amazon.com/cdk/v2/guide/home.html"
35+
},
36+
{
37+
"text": "AWS SDK for Rust",
38+
"link": "https://aws.amazon.com/sdk-for-rust/"
39+
}
40+
]
41+
},
42+
"deploy": {
43+
"text": [
44+
"cdk deploy"
45+
]
46+
},
47+
"testing": {
48+
"text": [
49+
"See the GitHub repo for detailed testing instructions."
50+
]
51+
},
52+
"cleanup": {
53+
"text": [
54+
"Delete the stack: <code>cdk destroy</code>."
55+
]
56+
},
57+
"authors": [
58+
{
59+
"name": "Phil Callister",
60+
"image": "https://media.licdn.com/dms/image/v2/D5603AQHElNV-QFIGQw/profile-displayphoto-shrink_200_200/profile-displayphoto-shrink_200_200/0/1725218566874?e=1735171200&v=beta&t=gr82L1aMjvNX8CZn1Nitg3fViTUYoPK_xnXNc8CdohQ",
61+
"bio": "I'm an Enterprise Solutions Architect at AWS, with a focus on Financial Services. As a passionate builder, I enjoy helping customers create innovative solutions to achieve their business objectives.",
62+
"linkedin": "philcallister"
63+
}
64+
],
65+
"patternArch": {
66+
"icon1": {
67+
"x": 20,
68+
"y": 50,
69+
"service": "apigw",
70+
"label": "API Gateway Websocket API"
71+
},
72+
"icon2": {
73+
"x": 50,
74+
"y": 50,
75+
"service": "lambda",
76+
"label": "AWS Lambda"
77+
},
78+
"icon3": {
79+
"x": 80,
80+
"y": 50,
81+
"service": "bedrock",
82+
"label": "Amazon Bedrock"
83+
},
84+
"line1": {
85+
"from": "icon1",
86+
"to": "icon2"
87+
},
88+
"line3": {
89+
"from": "icon2",
90+
"to": "icon3"
91+
}
92+
}
93+
}

0 commit comments

Comments
 (0)