Skip to content

Commit 007a805

Browse files
committed
chore: update samples without JS SDK from node 16 to 20
1 parent 2b637bc commit 007a805

File tree

80 files changed

+95
-95
lines changed

Some content is hidden

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

80 files changed

+95
-95
lines changed

alb-lambda-serverless/serverless.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ useDotenv: true
44

55
provider:
66
name: aws
7-
runtime: nodejs16.x
7+
runtime: nodejs20.x
88
memorySize: 256
99
timeout: 30
1010
# override the default stage (dev) to be `prod`, or you can use the `--stage` CLI option

apigw-api-key/template.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Description: Serverless patterns - Amazon API Gateway REST API with API Key (uks
44

55
Globals:
66
Function:
7-
Runtime: nodejs16.x
7+
Runtime: nodejs20.x
88
CodeUri: src/
99

1010
Resources:

apigw-client-certificate/template.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Description: Serverless patterns - Amazon API Gateway REST API with a Client Cer
44

55
Globals:
66
Function:
7-
Runtime: nodejs16.x
7+
Runtime: nodejs20.x
88
CodeUri: src/
99

1010
Resources:

apigw-http-api-eventbridge/template.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ Resources:
4242
Properties:
4343
CodeUri: src/
4444
Handler: app.lambdaHandler
45-
Runtime: nodejs16.x
45+
Runtime: nodejs20.x
4646
Events:
4747
EventBridgeTrigger:
4848
Type: CloudWatchEvent

apigw-http-api-lambda/template.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Description: An Amazon API Gateway HTTP API and an AWS Lambda function. (uksb-1t
66
Globals:
77
Function:
88
CodeUri: ./src
9-
Runtime: nodejs16.x
9+
Runtime: nodejs20.x
1010
MemorySize: 128
1111
Timeout: 15
1212

apigw-http-api-sqs-lambda-sls/serverless.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ provider:
88
name: aws
99

1010
# common configuration for all Lambda functions in this stack
11-
runtime: nodejs16.x
11+
runtime: nodejs20.x
1212
architecture: arm64 # use Graviton for running all Lambda functions
1313

1414
# use --region option value or the default - us-east-1

apigw-iam/template.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Resources:
4848
Properties:
4949
CodeUri: src/
5050
Handler: app.handler
51-
Runtime: nodejs16.x
51+
Runtime: nodejs20.x
5252
Events:
5353
ApiEvent:
5454
Type: Api

apigw-lambda-observability/template.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Description: Serverless patterns - API Gateway/Lambda with observability (uksb-1
66
Globals:
77
# Default values for the Lambda function configuration
88
Function:
9-
Runtime: nodejs16.x
9+
Runtime: nodejs20.x
1010
MemorySize: 128
1111
Timeout: 100
1212
Tracing: Active

apigw-lambda-qldb/template.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ Resources:
4040
Properties:
4141
CodeUri: src
4242
Handler: create-person.handler
43-
Runtime: nodejs16.x
43+
Runtime: nodejs20.x
4444
Policies:
4545
- AWSLambdaBasicExecutionRole
4646
- Version: 2012-10-17
@@ -68,7 +68,7 @@ Resources:
6868
Properties:
6969
CodeUri: src
7070
Handler: get-person.handler
71-
Runtime: nodejs16.x
71+
Runtime: nodejs20.x
7272
MemorySize: 512
7373
Policies:
7474
- AWSLambdaBasicExecutionRole
@@ -95,7 +95,7 @@ Resources:
9595
Properties:
9696
CodeUri: src
9797
Handler: get-person-history.handler
98-
Runtime: nodejs16.x
98+
Runtime: nodejs20.x
9999
MemorySize: 512
100100
Policies:
101101
- AWSLambdaBasicExecutionRole
@@ -122,7 +122,7 @@ Resources:
122122
Properties:
123123
CodeUri: src
124124
Handler: update-person.handler
125-
Runtime: nodejs16.x
125+
Runtime: nodejs20.x
126126
MemorySize: 512
127127
Policies:
128128
- AWSLambdaBasicExecutionRole
@@ -151,7 +151,7 @@ Resources:
151151
Properties:
152152
CodeUri: src
153153
Handler: delete-person.handler
154-
Runtime: nodejs16.x
154+
Runtime: nodejs20.x
155155
MemorySize: 512
156156
Policies:
157157
- AWSLambdaBasicExecutionRole

apigw-lambda-request-validator/template.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Description: >
77
Globals:
88
Function:
99
CodeUri: ./src
10-
Runtime: nodejs16.x
10+
Runtime: nodejs20.x
1111
MemorySize: 128
1212
Timeout: 15
1313

apigw-lambda-sfn-transcribe-translate-polly-sam/template.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ Resources:
5454
Properties:
5555
Handler: src/transcribeLaunch.handler
5656
FunctionName: "translator-dev-transcribeLaunch"
57-
Runtime: nodejs16.x
57+
Runtime: nodejs20.x
5858
Architectures:
5959
- x86_64
6060
MemorySize: 128
@@ -65,7 +65,7 @@ Resources:
6565
Properties:
6666
Handler: src/transcribeCheck.handler
6767
FunctionName: "translator-dev-transcribeCheck"
68-
Runtime: nodejs16.x
68+
Runtime: nodejs20.x
6969
Architectures:
7070
- x86_64
7171
MemorySize: 128
@@ -76,7 +76,7 @@ Resources:
7676
Properties:
7777
Handler: src/translate.handler
7878
FunctionName: "translator-dev-translate"
79-
Runtime: nodejs16.x
79+
Runtime: nodejs20.x
8080
Architectures:
8181
- x86_64
8282
MemorySize: 128
@@ -87,7 +87,7 @@ Resources:
8787
Properties:
8888
Handler: src/speech.handler
8989
FunctionName: "translator-dev-speech"
90-
Runtime: nodejs16.x
90+
Runtime: nodejs20.x
9191
Architectures:
9292
- x86_64
9393
MemorySize: 128

apigw-lambda-sls/serverless.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ provider:
88
name: aws
99

1010
# common configuration for all Lambda functions in this stack
11-
runtime: nodejs16.x
11+
runtime: nodejs20.x
1212
architecture: arm64 # use Graviton for running all Lambda functions
1313

1414
# override the default stage (dev)

apigw-method-cache/template.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Description: Serverless patterns - Amazon API Gateway REST API with method-level
44

55
Globals:
66
Function:
7-
Runtime: nodejs16.x
7+
Runtime: nodejs20.x
88
CodeUri: src/
99

1010
Resources:

apigw-mutualtls-lambda/template.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Description: >
77
Globals:
88
Function:
99
CodeUri: ./src
10-
Runtime: nodejs16.x
10+
Runtime: nodejs20.x
1111
MemorySize: 128
1212
Timeout: 15
1313

apigw-resource-policy/template.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Resources:
3030
Properties:
3131
CodeUri: src/
3232
Handler: app.handler
33-
Runtime: nodejs16.x
33+
Runtime: nodejs20.x
3434
Events:
3535
ApiEvent:
3636
Type: Api

apigw-rest-api-eventbridge-sqs-sam/template.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Description: Serverless pattern API Gateway to EventBridge (uksb-1tthgi812) (tag
33

44
Globals:
55
Function:
6-
Runtime: nodejs16.x
6+
Runtime: nodejs20.x
77
Architectures: ["arm64"]
88
Timeout: 29
99
MemorySize: 1024

apigw-rest-apigw-rest/template.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ Resources:
7474
Type: AWS::Serverless::Function
7575
Properties:
7676
Handler: app.handler
77-
Runtime: nodejs16.x
77+
Runtime: nodejs20.x
7878
CodeUri: src
7979
Environment:
8080
Variables:
@@ -92,7 +92,7 @@ Resources:
9292
Type: AWS::Serverless::Function
9393
Properties:
9494
Handler: app.handler
95-
Runtime: nodejs16.x
95+
Runtime: nodejs20.x
9696
CodeUri: src
9797
Environment:
9898
Variables:

apigw-sqs-lambda/template.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Resources:
3838
Description: Lambda to be invoked by the SQS Queue
3939
CodeUri: src/
4040
Handler: app.handler
41-
Runtime: nodejs16.x
41+
Runtime: nodejs20.x
4242
Timeout: 3
4343
MemorySize: 128
4444
Events:

apigw-websocket-api-connection-dynamodb/template.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Resources:
4646
DefaultRouteFunction:
4747
Type: AWS::Serverless::Function
4848
Properties:
49-
Runtime: nodejs16.x
49+
Runtime: nodejs20.x
5050
Handler: index.handler
5151
InlineCode: 'exports.handler = async (event) => {return {statusCode: 200, body: JSON.stringify(event)}}'
5252

apigw-websocket-api-lambda/template.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Description: An Amazon API Gateway WebSocket API and an AWS Lambda function.
66
Globals:
77
Function:
88
CodeUri: ./src
9-
Runtime: nodejs16.x
9+
Runtime: nodejs20.x
1010
MemorySize: 128
1111
Timeout: 15
1212

appconfig-feature-flag-sam/template.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ Resources:
128128
Properties:
129129
CodeUri: src/
130130
Handler: app.lambdaHandler
131-
Runtime: nodejs16.x
131+
Runtime: nodejs20.x
132132
Architectures:
133133
- x86_64
134134

bedrock-lambda-nodejs/template.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Resources:
88
Properties:
99
CodeUri: src/
1010
Handler: index.handler
11-
Runtime: nodejs16.x
11+
Runtime: nodejs20.x
1212
MemorySize: 128
1313
Timeout: 600
1414
Policies:

cloudwatch-logs-subscription-lambda-sam/template.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Globals:
88
Function:
99
Timeout: 3
1010
MemorySize: 128
11-
Runtime: nodejs16.x
11+
Runtime: nodejs20.x
1212
Architectures:
1313
- x86_64
1414

cognito-httpapi/template.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ Resources:
5555
Properties:
5656
CodeUri: src/
5757
Handler: app.handler
58-
Runtime: nodejs16.x
58+
Runtime: nodejs20.x
5959
Events:
6060
AppApi:
6161
Type: HttpApi

cognito-restapi/template.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Description: Serverless patterns - Amazon API Gateway REST API with Cognito User
44

55
Globals:
66
Function:
7-
Runtime: nodejs16.x
7+
Runtime: nodejs20.x
88
CodeUri: src/
99

1010
Parameters:

cognito-sns-sms-origination-id-sam/template.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ Resources:
141141
FunctionName: !Sub 'CustomSmsSender-${AWS::StackName}'
142142
Layers:
143143
- !Ref DependencyLayer
144-
Runtime: nodejs16.x
144+
Runtime: nodejs20.x
145145
Architectures:
146146
- x86_64
147147
Environment:

dynamodb-eventbridge/template.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Resources:
2323
Type: 'AWS::Serverless::Function'
2424
Properties:
2525
Handler: app.handler
26-
Runtime: nodejs16.x
26+
Runtime: nodejs20.x
2727
CodeUri: publish/
2828
Description: A Lambda function that forward changes on DynamoDB table to EventBridge bus.
2929
MemorySize: 128
@@ -47,7 +47,7 @@ Resources:
4747
Properties:
4848
CodeUri: subscribe/
4949
Handler: app.handler
50-
Runtime: nodejs16.x
50+
Runtime: nodejs20.x
5151
Description: A Lambda function that receive Insert events from the table.
5252
MemorySize: 128
5353
Timeout: 3
@@ -57,7 +57,7 @@ Resources:
5757
Properties:
5858
CodeUri: subscribe/
5959
Handler: app.handler
60-
Runtime: nodejs16.x
60+
Runtime: nodejs20.x
6161
Description: A Lambda function that receive Deletion events from the table.
6262
MemorySize: 128
6363
Timeout: 3

dynamodb-lambda/template.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Resources:
66
Type: 'AWS::Serverless::Function'
77
Properties:
88
Handler: app.handler
9-
Runtime: nodejs16.x
9+
Runtime: nodejs20.x
1010
CodeUri: src/
1111
Description: An Amazon DynamoDB trigger that logs the updates made to a table.
1212
MemorySize: 128

dynamodb-streams-lambda-event-filters/template.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Resources:
1414
Properties:
1515
CodeUri: src/handlers/
1616
Handler: dynamodb-insert-trigger.putItemTriggerHandler
17-
Runtime: nodejs16.x
17+
Runtime: nodejs20.x
1818
Architectures:
1919
- x86_64
2020
MemorySize: 128
@@ -41,7 +41,7 @@ Resources:
4141
Properties:
4242
CodeUri: src/handlers/
4343
Handler: dynamodb-delete-trigger.deleteItemTriggerHandler
44-
Runtime: nodejs16.x
44+
Runtime: nodejs20.x
4545
Architectures:
4646
- x86_64
4747
MemorySize: 128

eventbridge-cross-region/eventbus-destination/template.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Resources:
2121
Handler: app.handler
2222
MemorySize: 128
2323
Timeout: 3
24-
Runtime: nodejs16.x
24+
Runtime: nodejs20.x
2525

2626
EventRule:
2727
Type: AWS::Events::Rule

eventbridge-cross-region/eventbus-source/template.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ Resources:
106106
Handler: app.handler
107107
MemorySize: 128
108108
Timeout: 3
109-
Runtime: nodejs16.x
109+
Runtime: nodejs20.x
110110
Environment:
111111
Variables:
112112
EVENTSOURCE: !Ref EventSource

eventbridge-lambda-sls/serverless.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ provider:
88
name: aws
99

1010
# common configuration for all Lambda functions in this stack
11-
runtime: nodejs16.x
11+
runtime: nodejs20.x
1212
architecture: arm64 # use Graviton for running all Lambda functions
1313

1414
# use --region option value or the default - us-east-1

eventbridge-lambda/template.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Resources:
1010
Properties:
1111
CodeUri: src/
1212
Handler: app.handler
13-
Runtime: nodejs16.x
13+
Runtime: nodejs20.x
1414
Timeout: 3
1515
Events:
1616
Trigger:

0 commit comments

Comments
 (0)