From 8a48433e254478c6e8ef3c11872d7a43522b2665 Mon Sep 17 00:00:00 2001 From: Ben Dolman Date: Wed, 16 Oct 2024 17:31:31 -0600 Subject: [PATCH] Add a lambda timeout variable --- main.tf | 1 + variables.tf | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/main.tf b/main.tf index a0aa90e..4310ba3 100644 --- a/main.tf +++ b/main.tf @@ -61,6 +61,7 @@ resource "aws_lambda_function" "lambda" { s3_object_version = aws_s3_bucket_object.artifact.version_id source_code_hash = filebase64sha256(data.archive_file.zip_file_for_lambda.output_path) + timeout = var.timeout publish = true handler = var.handler runtime = var.runtime diff --git a/variables.tf b/variables.tf index 5dfff53..647c2a9 100644 --- a/variables.tf +++ b/variables.tf @@ -99,3 +99,8 @@ variable cloudwatch_log_groups_kms_arn { default = null } +variable "timeout" { + description = "The amount of time your Lambda Function has to run in seconds" + type = number + default = 3 +} \ No newline at end of file