Skip to content

Commit 56a3a21

Browse files
committed
Timeout
1 parent b2ea05c commit 56a3a21

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

common.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,5 +74,5 @@ resource "aws_iam_role_policy_attachment" "lambda_basic_policy" {
7474
resource "aws_sqs_queue" "queue" {
7575
name = var.queue_name
7676

77-
visibility_timeout_seconds = 300
77+
visibility_timeout_seconds = var.consumer_timeout_seconds
7878
}

consumer.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ resource "aws_lambda_function" "consumer_lambda" {
1212
package_type = "Image"
1313
image_uri = module.consumer_docker_image.image_uri
1414
role = aws_iam_role.lambda_exec.arn
15-
timeout = 300
15+
timeout = var.consumer_timeout_seconds
1616
memory_size = 3009
1717

1818
environment {

vars.tf

+7
Original file line numberDiff line numberDiff line change
@@ -119,3 +119,10 @@ variable "queue_name" {
119119
type = string
120120
default = "producer-consumer-queue"
121121
}
122+
123+
variable "consumer_timeout_seconds" {
124+
description = "Timeout for the consumer lambda"
125+
126+
type = number
127+
default = 900
128+
}

0 commit comments

Comments
 (0)