Skip to content

Commit 1770ab5

Browse files
committed
chore: update terraform samples without JS SDK from node 16 to 20
1 parent d3875f0 commit 1770ab5

File tree

11 files changed

+15
-15
lines changed

11 files changed

+15
-15
lines changed

alb-lambda-terraform/main.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ resource "aws_lb_target_group_attachment" "target_group_attachment" {
177177
# Create the Lambda Function
178178
resource "aws_lambda_function" "lambda_function" {
179179
function_name = "lambdaFunction"
180-
runtime = "nodejs16.x"
180+
runtime = "nodejs20.x"
181181
handler = "index.handler"
182182
filename = "lambda.zip"
183183
role = aws_iam_role.lambda_role.arn

apigw-lambda-qldb-terraform/main.tf

+5-5
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ resource "aws_lambda_function" "lambda_function_create_person" {
3535
source_code_hash = data.archive_file.lambda_zip_file.output_base64sha256
3636
handler = "create-person.handler"
3737
role = aws_iam_role.lambda_iam_role_create_person.arn
38-
runtime = "nodejs16.x"
38+
runtime = "nodejs20.x"
3939
environment {
4040
variables = {
4141
LEDGER_NAME = aws_qldb_ledger.ledger.id
@@ -118,7 +118,7 @@ resource "aws_lambda_function" "lambda_function_get_person" {
118118
source_code_hash = data.archive_file.lambda_zip_file.output_base64sha256
119119
handler = "get-person.handler"
120120
role = aws_iam_role.lambda_iam_role_get_person.arn
121-
runtime = "nodejs16.x"
121+
runtime = "nodejs20.x"
122122
memory_size = 512
123123
environment {
124124
variables = {
@@ -193,7 +193,7 @@ resource "aws_lambda_function" "lambda_function_get_person_history" {
193193
source_code_hash = data.archive_file.lambda_zip_file.output_base64sha256
194194
handler = "get-person-history.handler"
195195
role = aws_iam_role.lambda_iam_role_get_person_history.arn
196-
runtime = "nodejs16.x"
196+
runtime = "nodejs20.x"
197197
memory_size = 512
198198
environment {
199199
variables = {
@@ -268,7 +268,7 @@ resource "aws_lambda_function" "lambda_function_update_person" {
268268
source_code_hash = data.archive_file.lambda_zip_file.output_base64sha256
269269
handler = "update-person.handler"
270270
role = aws_iam_role.lambda_iam_role_update_person.arn
271-
runtime = "nodejs16.x"
271+
runtime = "nodejs20.x"
272272
memory_size = 512
273273
environment {
274274
variables = {
@@ -344,7 +344,7 @@ resource "aws_lambda_function" "lambda_function_delete_person" {
344344
source_code_hash = data.archive_file.lambda_zip_file.output_base64sha256
345345
handler = "delete-person.handler"
346346
role = aws_iam_role.lambda_iam_role_delete_person.arn
347-
runtime = "nodejs16.x"
347+
runtime = "nodejs20.x"
348348
memory_size = 512
349349
environment {
350350
variables = {

dynamodb-streams-lambda-terraform/main.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ resource "aws_lambda_function" "lambda_dynamodb_stream_handler" {
4040
source_code_hash = data.archive_file.lambda_zip_file.output_base64sha256
4141
handler = "index.handler"
4242
role = aws_iam_role.iam_for_lambda.arn
43-
runtime = "nodejs16.x"
43+
runtime = "nodejs20.x"
4444
}
4545

4646
data "archive_file" "lambda_zip_file" {

eventbridge-lambda-terraform/main.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ resource "aws_lambda_function" "lambda_function" {
2020
source_code_hash = data.archive_file.lambda_zip_file.output_base64sha256
2121
handler = "app.handler"
2222
role = aws_iam_role.lambda_iam_role.arn
23-
runtime = "nodejs16.x"
23+
runtime = "nodejs20.x"
2424
}
2525

2626
data "archive_file" "lambda_zip_file" {

eventbridge-sns-lambda-terraform/main.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ resource "aws_lambda_function" "lambda_function" {
103103
source_code_hash = data.archive_file.lambda_zip_file.output_base64sha256
104104
handler = "app.handler"
105105
role = aws_iam_role.lambda_iam_role.arn
106-
runtime = "nodejs16.x"
106+
runtime = "nodejs20.x"
107107
}
108108

109109

kinesis-lambda-terraform/main.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ resource "aws_lambda_function" "sample_lambda" {
2222
function_name = "sample-lambda"
2323
role = aws_iam_role.lambda_role.arn
2424
handler = "index.handler"
25-
runtime = "nodejs16.x" # Change to your preferred runtime
25+
runtime = "nodejs20.x" # Change to your preferred runtime
2626
}
2727
resource "aws_iam_role" "lambda_role" {
2828
name = "lambda-role"

lambda-eventbridge-terraform/main.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ resource "aws_lambda_function" "publisher_function" {
2929
source_code_hash = data.archive_file.lambda_zip_file.output_base64sha256
3030
handler = "app.handler"
3131
role = aws_iam_role.iam_for_lambda.arn
32-
runtime = "nodejs16.x"
32+
runtime = "nodejs20.x"
3333
}
3434

3535
data "archive_file" "lambda_zip_file" {

lambda-function-url-terraform/main.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ resource "aws_lambda_function" "lambda_function" {
2020
source_code_hash = data.archive_file.lambda_zip_file.output_base64sha256
2121
handler = "app.handler"
2222
role = aws_iam_role.lambda_iam_role.arn
23-
runtime = "nodejs16.x"
23+
runtime = "nodejs20.x"
2424
}
2525

2626
data "archive_file" "lambda_zip_file" {

lambda-sns-terraform/main.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ resource "aws_lambda_function" "lambda_function" {
2222
source_code_hash = data.archive_file.lambda_zip_file.output_base64sha256
2323
handler = "app.handler"
2424
role = aws_iam_role.lambda_iam_role.arn
25-
runtime = "nodejs16.x"
25+
runtime = "nodejs20.x"
2626
environment {
2727
variables = {
2828
SNStopic = aws_sns_topic.sns_topic.arn

lambda-sqs-terraform/main.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ resource "aws_lambda_function" "lambda_function" {
2222
source_code_hash = data.archive_file.lambda_zip_file.output_base64sha256
2323
handler = "app.handler"
2424
role = aws_iam_role.lambda_iam_role.arn
25-
runtime = "nodejs16.x"
25+
runtime = "nodejs20.x"
2626
environment {
2727
variables = {
2828
SQSqueueName = aws_sqs_queue.sqs_queue.url

s3-lambda-terraform/main.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ resource "aws_lambda_function" "lambda_s3_handler" {
3232
source_code_hash = data.archive_file.lambda_zip_file.output_base64sha256
3333
handler = "index.handler"
3434
role = aws_iam_role.iam_for_lambda.arn
35-
runtime = "nodejs16.x"
35+
runtime = "nodejs20.x"
3636
}
3737

3838
data "archive_file" "lambda_zip_file" {

0 commit comments

Comments
 (0)