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-rest-api-sqs-lambda-bedrock-cdk/README.md
+5-4Lines changed: 5 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,17 +27,17 @@ The following diagram illustrates the solutions architecture
27
27
cd apigw-rest-api-sqs-lambda-bedrock-cdk.
28
28
```
29
29
30
-
1. Deploy the stack to your default AWS account and region. The output of this command should give you the REST API URL.
30
+
1. Deploy the stack to your default AWS account and region with Amazon Bedrock availability. The output of this command should give you the REST API URL.
31
31
```
32
32
cd cdk
33
33
cdk deploy
34
34
```
35
35
36
36
## How it works
37
37
38
-
This pattern creates an Amazon API Gateway REST API, an Amazon SQS queue and an AWS Lambda function. AWS Lambda function consumes messages from SQS using [AWS lambda event source mapping](https://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html). The lambda function then calls Bedrock using the request from SQS. The Lambda function is set with the max concurrency of 10 (configurable through [cdk.context.json](./cdk/cdk.context.json)). This setting is enabled to make sure the requests does not overwhelm Amazon Bedrock.
38
+
This pattern creates an Amazon API Gateway REST API, an Amazon SQS queue and an AWS Lambda function. AWS Lambda function consumes messages from SQS using [AWS lambda event source mapping](https://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html). The lambda function then calls Amazon Bedrock using the request from SQS. The Lambda function is set with the max concurrency of 10 (configurable through [cdk.context.json](./cdk/cdk.context.json)). This setting is enabled to make sure the requests does not overwhelm Amazon Bedrock.
39
39
40
-
To achieve full functionality with this pattern, you must send the response from Lambda function to client using techniques such as websocket or GraphQL subscriptions. This pattern is an asynchronous pattern. For a simple pattern that synchronously call Bedrock, explore this [synchronous pattern](../apigw-lambda-bedrock-cdk-python).
40
+
To achieve full functionality with this pattern, you must send the response from Lambda function to client using techniques such as websocket or GraphQL subscriptions. This pattern is an asynchronous pattern. For a simple pattern that synchronously call Amazon Bedrock, explore this [synchronous pattern](../apigw-lambda-bedrock-cdk-python).
41
41
42
42
## Testing
43
43
@@ -46,7 +46,7 @@ Upon deployment, you will see the API endpoint URL in the output. It will take t
1. [Enable the model](https://docs.aws.amazon.com/bedrock/latest/userguide/model-access.html#manage-model-access) in Bedrock if you have not done before. The model used by the sample is "anthropic.claude-v2"
49
+
1. [Enable the model](https://docs.aws.amazon.com/bedrock/latest/userguide/model-access.html#manage-model-access) in Amazon Bedrock if you have not done before. The model used by the sample is "anthropic.claude-3-5-sonnet-20240620-v1:0".
50
50
51
51
2. Post the request to the api
52
52
```bash
@@ -63,6 +63,7 @@ curl -X POST https://${API_ID}.execute-api.${REGION_NAME}.amazonaws.com/prod/inv
63
63
-[Tutorial: Build an API Gateway REST API with AWS integration](https://docs.aws.amazon.com/apigateway/latest/developerguide/getting-started-aws-proxy.html)
64
64
-[How do I use API Gateway as a proxy for another AWS service?](https://aws.amazon.com/premiumsupport/knowledge-center/api-gateway-proxy-integrate-service/)
0 commit comments