Skip to content

Commit 24aa723

Browse files
adding 2023 runtime and lambda architecture variable
1 parent d53521e commit 24aa723

File tree

5 files changed

+19
-11
lines changed

5 files changed

+19
-11
lines changed

autotagging.tf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
# This is the optional Autotagging feature.
22

33
resource "aws_lambda_function" "auto_tagging" {
4-
count = var.enable_auto_tagging == true ? 1 : 0
5-
4+
count = var.enable_auto_tagging == true ? 1 : 0
5+
architectures = var.architectures
66
description = var.lambda_description
77
s3_key = var.auto_tagging_s3_key
88
s3_bucket = var.auto_tagging_s3_bucket
99
function_name = "${var.lambda_function_name}-auto_tagging"
1010
role = aws_iam_role.auto_tagging_lambda[0].arn
1111
handler = "provided"
12-
runtime = "provided.al2"
12+
runtime = "provided.al2023"
1313
memory_size = var.lambda_memory_size
1414
# lets set 2 minutes
1515
timeout = var.lambda_timeout

glue_create.tf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -243,15 +243,15 @@ resource "aws_iam_role" "glue_create" {
243243
}
244244

245245
resource "aws_lambda_function" "glue_create_lambda" {
246-
count = var.enable_glue_create ? 1 : 0
247-
246+
count = var.enable_glue_create ? 1 : 0
247+
architectures = var.architectures
248248
description = "Greate tables in AWS Glue catalog based on the table prefix"
249249
s3_key = var.glue_create_config.lambda_s3_key
250250
s3_bucket = var.glue_create_config.lambda_s3_bucket
251251
function_name = var.glue_create_config.lambda_function_name
252252
role = aws_iam_role.glue_create[0].arn
253253
handler = "provided"
254-
runtime = "provided.al2"
254+
runtime = "provided.al2023"
255255
memory_size = var.lambda_memory_size
256256
timeout = var.lambda_timeout
257257
environment {

glue_sync.tf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -172,15 +172,15 @@ resource "aws_iam_role" "glue_sync" {
172172
}
173173

174174
resource "aws_lambda_function" "glue_sync_lambda" {
175-
count = var.enable_glue_sync ? 1 : 0
176-
175+
count = var.enable_glue_sync ? 1 : 0
176+
architectures = var.architectures
177177
description = "Greate tables in AWS Glue catalog based on the table prefix"
178178
s3_key = var.glue_sync_config.lambda_s3_key
179179
s3_bucket = var.glue_sync_config.lambda_s3_bucket
180180
function_name = var.glue_sync_config.lambda_function_name
181181
role = aws_iam_role.glue_sync[0].arn
182182
handler = "provided"
183-
runtime = "provided.al2"
183+
runtime = "provided.al2023"
184184
memory_size = var.lambda_memory_size
185185
timeout = var.lambda_timeout
186186
environment {

main.tf

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,12 +87,13 @@ locals {
8787

8888
resource "aws_lambda_function" "this_lambda" {
8989
description = var.lambda_description
90+
architectures = var.architectures
9091
s3_key = var.lambda_s3_key
9192
s3_bucket = var.lambda_s3_bucket
9293
function_name = var.lambda_function_name
9394
role = aws_iam_role.this_iam_role_lambda_kinesis.arn
9495
handler = "provided"
95-
runtime = "provided.al2"
96+
runtime = "provided.al2023"
9697
memory_size = var.lambda_memory_size
9798
# lets set 2 minutes
9899
timeout = var.lambda_timeout
@@ -113,13 +114,14 @@ resource "aws_lambda_function" "this_lambda" {
113114
#### This lambda is optional and used only when grouping of events is required
114115
resource "aws_lambda_function" "group_events_lambda" {
115116
count = local.enable_group_events ? 1 : 0
117+
architectures = var.architectures
116118
description = "Group events for oxbow based on the table prefix"
117119
s3_key = var.events_lambda_s3_key
118120
s3_bucket = var.events_lambda_s3_bucket
119121
function_name = var.events_lambda_function_name
120122
role = aws_iam_role.this_iam_role_lambda_kinesis.arn
121123
handler = "provided"
122-
runtime = "provided.al2"
124+
runtime = "provided.al2023"
123125

124126
environment {
125127
variables = merge({

variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -373,3 +373,9 @@ variable "group_event_lambda_maximum_batching_window_in_seconds" {
373373
description = "describe your variable"
374374
default = 1
375375
}
376+
377+
variable "architectures" {
378+
description = "Instruction set architecture for your Lambda function. Valid values are [\"x86_64\"] and [\"arm64\"]."
379+
type = list(string)
380+
default = ["x86_64"]
381+
}

0 commit comments

Comments
 (0)