You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: apigw-lambda-bedrock-sam/README.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Amazon API Gateway to AWS Lambda to Amazon Bedrock using SAM
2
2
3
-
This sample project deploys an Amazon API Gateway REST API with an AWS Lambda integration. The Lambda function is written in Python, calls the Amazon Bedrock API for Anthropic Claude-v2 model and returns a response containing the generated content.
3
+
This sample project deploys an Amazon API Gateway REST API with an AWS Lambda integration. The Lambda function is written in Python, calls the Amazon Bedrock API for Anthropic Claude 3.5 Sonnet model and returns a response containing the generated content.
4
4
5
5
Learn more about this pattern at Serverless Land Patterns: serverlessland.com/patterns/apigw-lambda-bedrock
6
6
@@ -100,16 +100,16 @@ Amazon Bedrock users need to request access to models before they are available
100
100
101
101
## How it works
102
102
103
-
This SAM project uses Amazon Bedrock API for Anthropic Claude-v2 model to generate content based on given prompt. This is exposed through a serverless REST API. Please refer to the architecture diagram below:
103
+
This SAM project uses Amazon Bedrock API for Anthropic Claude 3.5 Sonnet model to generate content based on given prompt. This is exposed through a serverless REST API. Please refer to the architecture diagram below:
104
104

105
105
106
106
Here's a breakdown of the steps:
107
107
108
108
1. **Amazon API Gateway**: Receives the HTTP POST request containing the prompt.
109
109
110
-
2. **AWS Lambda**: Triggered by the API Gateway, this functionforwards the prompt to Amazon Bedrock API using boto3 bedrock-runtime API. It uses Anthropic Claude-v2 model and sets other required parameters to fixed values for simplicity.
110
+
2. **AWS Lambda**: Triggered by the API Gateway, this functionforwards the prompt to Amazon Bedrock API using boto3 bedrock-runtime API. It uses Anthropic Claude 3.5 Sonnet model and sets parameters like temperature, max tokens, and other configuration options.
111
111
112
-
3. **Amazon Bedrock**: Based on the given prompt, using Anthropic Claude-v2 model generates the content and returns the response to Lambda.
112
+
3. **Amazon Bedrock**: Based on the given prompt, using Anthropic Claude 3.5 Sonnet model generates the content and returns the response to Lambda.
113
113
114
114
4. **Response**: Lambda processes the Bedrock output and sends it back to the user via the API Gateway.
0 commit comments