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
-59Lines changed: 0 additions & 59 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -43,61 +43,6 @@ Amazon Bedrock users need to request access to models before they are available
43
43
44
44
For production applications, you should [enable authentication for the API Gateway](https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-control-access-to-api.html) using one of several available options and [follow the API Gateway security best practices](https://docs.aws.amazon.com/apigateway/latest/developerguide/security-best-practices.html).
45
45
46
-
5. Note the outputs from the SAM deployment process. These contain the resource names and/or ARNs which are used for next step as well as testing.
47
-
6. Run the `create_lambda_layer.sh`. You may have to change the file permission to make it executable. This will create the lambda layer with necessary boto3 api for bedrock.
8. You may have to press `q` to come out of the output. Copy the value of `LayerVersionArn` from the above output and provide it into the next step. Such as:
71
-
```bash
72
-
Enter the LayerVersionArn from the above command: arn:aws:lambda:us-east-1:xxxxxxxxxxxx:layer:boto3-lambda-layer:1
73
-
```
74
-
9. Please copy the value of `ContentGenerationLambdaFunction` from the `sam deploy --guided` output and provide that as response to next question. Such as:
75
-
```bash
76
-
Enter the Lambda functionname from the SAM deploy output: your-stack-name-ContentGenerationLambdaXx-xxxxxxxxxxxx
77
-
```
78
-
The script will now run aws cli command to add the newly created layer to the Lambda function. It will show output as below:
79
-
It will show output like below:
80
-
```bash
81
-
Adding the new layer to your Lambda function's configuration. Please wait ...
"LastUpdateStatusReason": "The function is being created.",
89
-
"LastUpdateStatusReasonCode": "Creating",
90
-
"PackageType": "Zip",
91
-
"Architectures": [
92
-
"arm64"
93
-
],
94
-
"EphemeralStorage": {
95
-
"Size": 512
96
-
}
97
-
}
98
-
```
99
-
10. You may have to press `q` to come out of the output. The setup is ready for testing.
100
-
101
46
## How it works
102
47
103
48
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:
@@ -135,10 +80,6 @@ The API returns a response with generated content. Such as (Your out may vary):
135
80
```bash
136
81
sam delete
137
82
```
138
-
2. Delete the Lambda layer version using the `delete_lambda_layer.sh` script. You may have to give execution permission to the file. You will need to pass the Lambda layer name and the version in the inpout when requested:
0 commit comments