Skip to content

Commit 1d069b0

Browse files
authored
Merge branch 'main' into lambda-durable-human-approval-sam
2 parents 9426048 + 91afcef commit 1d069b0

144 files changed

Lines changed: 6963 additions & 311 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

activemq-private-lambda-java-sam/activemq_consumer_dynamo_sam/activemq_event_consumer_function/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
<dependency>
5757
<groupId>com.fasterxml.jackson.core</groupId>
5858
<artifactId>jackson-core</artifactId>
59-
<version>2.15.1</version>
59+
<version>2.18.6</version>
6060
</dependency>
6161
<dependency>
6262
<groupId>org.apache.activemq</groupId>

activemq-private-lambda-java-sam/activemq_message_sender_json/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
<dependency>
7777
<groupId>com.fasterxml.jackson.core</groupId>
7878
<artifactId>jackson-core</artifactId>
79-
<version>2.15.1</version>
79+
<version>2.18.6</version>
8080
</dependency>
8181
<dependency>
8282
<groupId>com.fasterxml.jackson.datatype</groupId>

alb-lambda-pulumi-go/go.mod

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,23 +11,23 @@ require (
1111
require (
1212
dario.cat/mergo v1.0.0 // indirect
1313
github.com/Masterminds/semver v1.5.0 // indirect
14-
github.com/Microsoft/go-winio v0.6.1 // indirect
15-
github.com/ProtonMail/go-crypto v1.1.3 // indirect
14+
github.com/Microsoft/go-winio v0.6.2 // indirect
15+
github.com/ProtonMail/go-crypto v1.1.6 // indirect
1616
github.com/aead/chacha20 v0.0.0-20180709150244-8b13a72661da // indirect
1717
github.com/blang/semver v3.5.1+incompatible // indirect
1818
github.com/cheggaaa/pb v1.0.29 // indirect
19-
github.com/cloudflare/circl v1.6.1 // indirect
20-
github.com/cyphar/filepath-securejoin v0.3.6 // indirect
19+
github.com/cloudflare/circl v1.6.3 // indirect
20+
github.com/cyphar/filepath-securejoin v0.4.1 // indirect
2121
github.com/djherbis/times v1.5.0 // indirect
2222
github.com/emirpasic/gods v1.18.1 // indirect
2323
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect
24-
github.com/go-git/go-billy/v5 v5.6.1 // indirect
25-
github.com/go-git/go-git/v5 v5.13.1 // indirect
24+
github.com/go-git/go-billy/v5 v5.6.2 // indirect
25+
github.com/go-git/go-git/v5 v5.16.5 // indirect
2626
github.com/gofrs/uuid v4.2.0+incompatible // indirect
2727
github.com/gogo/protobuf v1.3.2 // indirect
2828
github.com/golang/glog v1.2.4 // indirect
29-
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
30-
github.com/golang/protobuf v1.5.3 // indirect
29+
github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8 // indirect
30+
github.com/golang/protobuf v1.5.4 // indirect
3131
github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645 // indirect
3232
github.com/hashicorp/errwrap v1.1.0 // indirect
3333
github.com/hashicorp/go-multierror v1.1.1 // indirect
@@ -38,16 +38,16 @@ require (
3838
github.com/mitchellh/go-ps v1.0.0 // indirect
3939
github.com/opentracing/basictracer-go v1.1.0 // indirect
4040
github.com/opentracing/opentracing-go v1.2.0 // indirect
41-
github.com/pjbgf/sha1cd v0.3.0 // indirect
41+
github.com/pjbgf/sha1cd v0.3.2 // indirect
4242
github.com/pkg/errors v0.9.1 // indirect
4343
github.com/pkg/term v1.1.0 // indirect
4444
github.com/pulumi/pulumi-docker/sdk/v3 v3.2.0 // indirect
4545
github.com/rivo/uniseg v0.2.0 // indirect
46-
github.com/rogpeppe/go-internal v1.12.0 // indirect
46+
github.com/rogpeppe/go-internal v1.14.1 // indirect
4747
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 // indirect
4848
github.com/santhosh-tekuri/jsonschema/v5 v5.0.0 // indirect
4949
github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 // indirect
50-
github.com/skeema/knownhosts v1.3.0 // indirect
50+
github.com/skeema/knownhosts v1.3.1 // indirect
5151
github.com/spf13/cobra v1.6.1 // indirect
5252
github.com/spf13/pflag v1.0.5 // indirect
5353
github.com/texttheater/golang-levenshtein v1.0.1 // indirect
@@ -57,13 +57,10 @@ require (
5757
github.com/xanzy/ssh-agent v0.3.3 // indirect
5858
go.uber.org/atomic v1.9.0 // indirect
5959
golang.org/x/crypto v0.45.0 // indirect
60-
golang.org/x/mod v0.29.0 // indirect
6160
golang.org/x/net v0.47.0 // indirect
62-
golang.org/x/sync v0.18.0 // indirect
6361
golang.org/x/sys v0.38.0 // indirect
6462
golang.org/x/term v0.37.0 // indirect
6563
golang.org/x/text v0.31.0 // indirect
66-
golang.org/x/tools v0.38.0 // indirect
6764
google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 // indirect
6865
google.golang.org/grpc v1.56.3 // indirect
6966
google.golang.org/protobuf v1.33.0 // indirect

alb-lambda-pulumi-go/go.sum

Lines changed: 26 additions & 36 deletions
Large diffs are not rendered by default.

apigw-http-api-lambda-rds-proxy-java/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
<dependency>
5353
<groupId>com.fasterxml.jackson.core</groupId>
5454
<artifactId>jackson-core</artifactId>
55-
<version>2.19.1</version>
55+
<version>2.21.1</version>
5656
</dependency>
5757
<dependency>
5858
<groupId>com.fasterxml.jackson.core</groupId>

apigw-lambda-bedrock-cdk-java/infrastructure/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
<dependency>
5555
<groupId>org.assertj</groupId>
5656
<artifactId>assertj-core</artifactId>
57-
<version>3.23.1</version>
57+
<version>3.27.7</version>
5858
<scope>test</scope>
5959
</dependency>
6060
</dependencies>

apigw-lambda-bedrock-js-sam/README.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Amazon API Gateway to AWS Lambda to Amazon Bedrock using AWS SDK for JS and SAM
22

3-
This sample project deploys an Amazon API Gateway REST API with an AWS Lambda integration. The Lambda function is written in TypeScript, 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 TypeScript, calls the Amazon Bedrock API for Anthropic Claude Sonnet 4.5 model and returns a response containing the generated content.
44

55
Learn more about this pattern at Serverless Land Patterns: https://serverlessland.com/patterns/apigw-lambda-bedrock-js-sam
66

@@ -100,16 +100,16 @@ Amazon Bedrock users need to request access to models before they are available
100100
101101
## How it works
102102
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 Sonnet 4.5 model to generate content based on given prompt. This is exposed through a serverless REST API. Please refer to the architecture diagram below:
104104
![End to End Architecture](images/architecture.png)
105105
106106
Here's a breakdown of the steps:
107107

108108
1. **Amazon API Gateway**: Receives the HTTP POST request containing the prompt.
109109

110-
2. **AWS Lambda**: Triggered by the API Gateway, this function forwards 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 function forwards the prompt to Amazon Bedrock API using boto3 bedrock-runtime API. It uses Anthropic Claude Sonnet 4.5 model and sets other required parameters to fixed values for simplicity.
111111

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 Sonnet 4.5 model generates the content and returns the response to Lambda.
113113

114114
4. **Response**: Lambda processes the Bedrock output and sends it back to the user via the API Gateway.
115115

@@ -124,18 +124,17 @@ curl -d '{"prompt": "Please write 5 lines on Solar Systems"}' -H 'Content-Type:
124124
The API returns a response with generated content. Such as (Your output may vary):
125125

126126
```
127-
"{\"completion\":\" Here are a few key things about Amazon Web Services (AWS):\\n\\n- AWS is a cloud computing platform that provides services like compute power, storage, databases, analytics, etc on demand over the internet. It operates data centers around the world that customers can access.\\n\\n- Some of the most popular AWS services are EC2 (virtual servers), S3 (cloud storage), Lambda (serverless computing), CloudFront (content delivery network), Route 53 (DNS service), and many more. \\n\\n- AWS was first launched in 2006 and has grown to be the largest cloud provider in the world. Many big companies like Netflix, Airbnb, Expedia rely on AWS for their infrastructure.\\n\\n- Customers pay only for the services they use without any upfront costs. This makes AWS attractive for startups and companies that want flexibility and don't want to manage their own hardware.\\n\\n- AWS offers high availability, scalability, security and reliability at a fraction of the\",\"stop_reason\":\"max_tokens\",\"stop\":null}"
127+
{"model":"claude-sonnet-4-5-20250929","id":"msg_bdrk_01S1Rn7gPy3cdRt9aFWf255a","type":"message","role":"assistant","content":[{"type":"text","text":"# Five Facts About Solar Systems\n\n1. **Our Solar System** formed approximately 4.6 billion years ago from a giant rotating cloud of gas and dust called the solar nebula.\n\n2. **The Sun** contains 99.8% of the Solar System's total mass and provides the gravitational force that keeps all planets in orbit.\n\n3. **Eight planets** orbit our Sun in elliptical paths, divided into rocky terrestrial planets (Mercury, Venus, Earth, Mars) and gas/ice giants (Jupiter, Saturn, Uranus, Neptune).\n\n4. **Beyond Neptune** lies the Kuiper Belt, home to dwarf planets like Pluto and countless icy bodies left over from the Solar System's formation.\n\n5. **Scientists estimate** there are billions of other solar systems in our Milky Way galaxy alone, many potentially harboring planets in habitable zones."}],"stop_reason":"end_turn","stop_sequence":null,"usage":{"input_tokens":16,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":0},"output_tokens":192}}
128128
```
129129
130-
131130
## Cleanup
132131
133132
1. To delete the resources deployed to your AWS account via AWS SAM, run the following command:
134133
135134
```bash
136135
sam delete
137136
```
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:
137+
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 input when requested:
139138
```bash
140139
./delete_lambda_layer.sh
141140
```

apigw-lambda-bedrock-js-sam/example-pattern.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
"headline": "How it works",
99
"text": [
1010
"Amazon API Gateway receives the HTTP POST request containing a text which will is taken as a prompt.",
11-
"AWS Lambda is triggered by the API Gateway, this function forwards the prompt to Amazon Bedrock API using AWS SDK for javascript bedrock-runtime API. It uses Anthropic Claude-v2 model and sets other required parameters to fixed values for simplicity.",
12-
"Based on the given prompt, using Anthropic Claude-v2 model, Amazon Bedrock generates the content and returns the response to Lambda.",
11+
"AWS Lambda is triggered by the API Gateway, this function forwards the prompt to Amazon Bedrock API using AWS SDK for javascript bedrock-runtime API. It uses Anthropic Claude Sonnet 4.5 model and sets other required parameters to fixed values for simplicity.",
12+
"Based on the given prompt, using Anthropic Claude Sonnet 4.5 model, Amazon Bedrock generates the content and returns the response to Lambda.",
1313
"Lambda processes the Bedrock output and sends it back to the user via the API Gateway."
1414
]
1515
},

apigw-lambda-bedrock-js-sam/src/index.mjs

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,25 @@ export const handler = async (event) => {
99
//console.log(prompt)
1010
//const prompt = 'Write a text to be posted on my social media channels about how Amazon Bedrock works';
1111
const body = {
12-
'prompt': "\n\nHuman:" + prompt + "\n\nAssistant:",
13-
"temperature": 0.5,
14-
"top_p": 1,
15-
"top_k": 250,
16-
"max_tokens_to_sample": 200,
17-
"stop_sequences": ["\n\nHuman:"]
18-
}
12+
anthropic_version: "bedrock-2023-05-31",
13+
messages: [
14+
{
15+
role: "user",
16+
content: [
17+
{
18+
"type": "text",
19+
"text": prompt
20+
}
21+
],
22+
},
23+
],
24+
max_tokens: 200
25+
};
1926
const input = {
2027
body: JSON.stringify(body),
2128
contentType: "application/json",
2229
accept: "application/json",
23-
modelId: "anthropic.claude-v2",
30+
modelId: "global.anthropic.claude-sonnet-4-5-20250929-v1:0",
2431
};
2532
const command = new InvokeModelCommand(input);
2633
const res = await client.send(command);
@@ -29,7 +36,7 @@ export const handler = async (event) => {
2936
//console.log(JSON.stringify(stringifiedResponse));
3037
const response = {
3138
statusCode: 200,
32-
body: JSON.stringify(stringifiedResponse),
39+
body: stringifiedResponse,
3340
};
3441
return response;
35-
};
42+
};

apigw-lambda-dsql/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Amazon Aurora DSQL is the fastest serverless, distributed SQL database with active-active high availability and multi-Region strong consistency. Aurora DSQL enables you to build always available applications with virtually unlimited scalability, the highest availability, and zero infrastructure management. It is designed to make scaling and resilience effortless for your applications and offers the fastest distributed SQL reads and writes.
44

5-
This pattern deploys a API Gateway REST API, Lambda function and an Aurora DSQL PostgreSQL cluster.
5+
This pattern deploys a API Gateway REST API, Lambda function and an Aurora DSQL PostgreSQL cluster. The Lambda function uses Aurora DSQL Connectors for Python that simplify IAM authorization for customers using standard PostgreSQL drivers to connect to Aurora DSQL clusters.
66

77
Learn more about this pattern at [Serverless Land Patterns](https://serverlessland.com/patterns/apigw-lambda-dsql)
88

0 commit comments

Comments
 (0)