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-cdk-python/README.md
+10-10Lines changed: 10 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
# Text generation via ApiGateway -> Lambda -> Bedrock
1
+
# Text generation via Amazon API Gateway -> AWS Lambda -> Amazon Bedrock
2
2
3
3

4
4
@@ -18,27 +18,27 @@ Important: this application uses various AWS services and there are costs associ
18
18
## Amazon Bedrock setup instructions
19
19
You must request access to a model before you can use it. If you try to use the model (with the API or console) before you have requested access to it, you receive an error message. For more information, see [Model access](https://docs.aws.amazon.com/bedrock/latest/userguide/model-access.html).
20
20
21
-
1. In the AWS console, select the region from which you want to access Amazon Bedrock. At the time of writing, Amazon Bedrock is available in us-east-1 (N. Virginia) and us-west-2 (Oregon) regions.
21
+
1. In the AWS console, select the region from which you want to access Amazon Bedrock. At the time of writing, Amazon Bedrock is available in most major regions.

40
40
41
-
6. Use the checkboxes to select the models you wish to enable. Review the applicable EULAs as needed. Click **Save changes** to activate the models in your account. For this pattern we only need Anthropic/Claude but feel free to experiment with others.
41
+
6. Use the checkboxes to select the models you wish to enable. Review the applicable EULAs as needed. Click **Save changes** to activate the models in your account. For this pattern we only need AnthropicClaude 3 Haiku but feel free to experiment with others.
42
42
43
43
## Deployment Instructions
44
44
@@ -74,14 +74,14 @@ You must request access to a model before you can use it. If you try to use the
74
74
```
75
75
cdk deploy
76
76
```
77
-
1. After deployment completes, take a look at the Outputs section. There will be an entry containing the URL of the API Gateway resource you just created. Copy that URL as you'll need it for your tests.
77
+
1. After deployment completes, take a look at the Outputs section. There will be an entry containing the URL of the Amazon API Gateway resource you just created. Copy that URL as you'll need it for your tests.
78
78
79
79
The format of the URL will be something like `https://{id}.execute-api.{region}.amazonaws.com/prod`
80
80
81
81
82
82
## How it works
83
83
84
-
CDK will create an Api Gateway, along with a resource and a POST method. There's a AWS Lambda function that will be taking the prompt and invoking an Amazon Bedrock model (anthropic.claude-v2) synchronously. If you wish to try other models, make sure to modify the policy attached to the Lambda function and invoke the right model.
84
+
CDK will create an Amazon API Gateway, along with a resource and a POST method. There is an AWS Lambda function that will be taking the prompt and invoking an Amazon Bedrock model (anthropic.claude-3-haiku-20240307-v1:0) synchronously. If you wish to try other models, make sure to modify the policy attached to the Lambda function and invoke the right model.
85
85
86
86
This pattern is a synchronous pattern. For an asynchronous approach, please check [this](../apigw-rest-api-sqs-lambda-bedrock-cdk) pattern that involves the usage of Amazon SQS.
87
87
@@ -107,7 +107,7 @@ Follow the example below and replace `{your-api-url}` with your api url from ste
107
107
```
108
108
109
109
## Extra Resources
110
-
* [Bedrock Api Reference](https://docs.aws.amazon.com/bedrock/latest/APIReference/welcome.html)
110
+
* [Amazon Bedrock Api Reference](https://docs.aws.amazon.com/bedrock/latest/APIReference/welcome.html)
111
111
112
112
----
113
113
Copyright 2023 Amazon.com, Inc. or its affiliates. All Rights Reserved.
0 commit comments