Skip to content

Commit 9ff961c

Browse files
committed
add timeout and memory size variables for Lambda function
1 parent 1addc14 commit 9ff961c

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

main.tf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ module "lambda" {
1818
function_name = module.this.id
1919
handler = "index.handler"
2020
runtime = "nodejs22.x"
21-
21+
timeout = var.timeout
22+
memory_size = var.memory_size
2223

2324
lambda_environment = {
2425
variables = {

variables.tf

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,15 @@ variable "log_group_names" {
2525
type = map(string)
2626
default = {}
2727
}
28+
29+
variable "timeout" {
30+
description = "Lambda function timeout in seconds"
31+
type = number
32+
default = 3
33+
}
34+
35+
variable "memory_size" {
36+
description = "Lambda function memory size in MB"
37+
type = number
38+
default = 128
39+
}

0 commit comments

Comments
 (0)