File tree 3 files changed +9
-2
lines changed
3 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -74,5 +74,5 @@ resource "aws_iam_role_policy_attachment" "lambda_basic_policy" {
74
74
resource "aws_sqs_queue" "queue" {
75
75
name = var. queue_name
76
76
77
- visibility_timeout_seconds = 300
77
+ visibility_timeout_seconds = var . consumer_timeout_seconds
78
78
}
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ resource "aws_lambda_function" "consumer_lambda" {
12
12
package_type = " Image"
13
13
image_uri = module. consumer_docker_image . image_uri
14
14
role = aws_iam_role. lambda_exec . arn
15
- timeout = 300
15
+ timeout = var . consumer_timeout_seconds
16
16
memory_size = 3009
17
17
18
18
environment {
Original file line number Diff line number Diff line change @@ -119,3 +119,10 @@ variable "queue_name" {
119
119
type = string
120
120
default = " producer-consumer-queue"
121
121
}
122
+
123
+ variable "consumer_timeout_seconds" {
124
+ description = " Timeout for the consumer lambda"
125
+
126
+ type = number
127
+ default = 900
128
+ }
You can’t perform that action at this time.
0 commit comments