From 8306f4fc47726f5d2e71ebd952ac21aef2e44436 Mon Sep 17 00:00:00 2001 From: constanca Date: Thu, 27 Jun 2024 16:11:45 +0200 Subject: [PATCH 1/3] Add lambda timeout option Signed-off-by: constanca --- README.md | 2 ++ variables.tf | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/README.md b/README.md index 8484992..0efd8d9 100644 --- a/README.md +++ b/README.md @@ -209,6 +209,7 @@ The `config.yaml` placed inside the bucket will be: | [inputs](#input\_inputs) | List of inputs to ESF. If none given, make sure to set config-file-local-path variable.
You can find instructions on the variables in https://www.elastic.co/guide/en/esf/current/aws-deploy-elastic-serverless-forwarder.html#s3-config-file-fields. |
list(object({
type = string
id = string
outputs = list(object({
type = string
args = object({
elasticsearch_url = optional(string)
logstash_url = optional(string)
cloud_id = optional(string)
api_key = optional(string)
username = optional(string)
password = optional(string)
es_datastream_name = string
batch_max_actions = optional(number)
batch_max_bytes = optional(number)
ssl_assert_fingerprint = optional(string)
compression_level = optional(string)
})
}))
}))
| `[]` | no | | [kms-keys](#input\_kms-keys) | List of KMS Keys ARNs to be used for decrypting AWS SSM Secrets, Kinesis Data Streams, SQS queue, or S3 buckets | `list(string)` | `[]` | no | | [lambda-name](#input\_lambda-name) | ESF Lambda function name | `string` | n/a | yes | +| [lambda-timeout](#input\_lambda-timeout) | The amount of time your Lambda Function has to run in seconds. | `number` | `3` | no | | [log\_level](#input\_log\_level) | Log level for ESF | `string` | `"INFO"` | no | | [release-version](#input\_release-version) | ESF release version. You can find the possible values in https://github.com/elastic/elastic-serverless-forwarder/tags. | `string` | n/a | yes | | [s3-buckets](#input\_s3-buckets) | List of S3 bucket ARNs that are sources for the S3 SQS Event Notifications | `list(string)` | `[]` | no | @@ -225,4 +226,5 @@ The `config.yaml` placed inside the bucket will be: | [esf-replay-queue](#output\_esf-replay-queue) | Name of the ESF replay queue. | | [esf-replay-queue-dlq](#output\_esf-replay-queue-dlq) | Name of the Dead Letter Queue for the ESF replay queue. | + \ No newline at end of file diff --git a/variables.tf b/variables.tf index e4508d1..87f343a 100644 --- a/variables.tf +++ b/variables.tf @@ -157,4 +157,10 @@ variable "continuing-queue" { batch_size = 10 batching_window_in_second = 0 } +} + +variable "lambda-timeout" { + description = "The amount of time your Lambda Function has to run in seconds." + type = number + default = 3 } \ No newline at end of file From 9bd0d8ead10e0f3735f949b22516f6d83b715955 Mon Sep 17 00:00:00 2001 From: constanca Date: Thu, 27 Jun 2024 16:13:39 +0200 Subject: [PATCH 2/3] Add lambda timeout option Signed-off-by: constanca --- esf.tf | 1 + 1 file changed, 1 insertion(+) diff --git a/esf.tf b/esf.tf index 016b25c..d431742 100644 --- a/esf.tf +++ b/esf.tf @@ -159,6 +159,7 @@ module "esf-lambda-function" { handler = "main_aws.lambda_handler" runtime = "python3.9" architectures = ["x86_64"] + timeout = var.lambda-timeout create_package = false s3_existing_package = { From 77442cf13c3cbf9a84f2d5aca93625d7d06a72a2 Mon Sep 17 00:00:00 2001 From: constanca Date: Thu, 27 Jun 2024 17:06:06 +0200 Subject: [PATCH 3/3] Update lambda timeout to 900s Signed-off-by: constanca --- variables.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/variables.tf b/variables.tf index 87f343a..fad831e 100644 --- a/variables.tf +++ b/variables.tf @@ -162,5 +162,5 @@ variable "continuing-queue" { variable "lambda-timeout" { description = "The amount of time your Lambda Function has to run in seconds." type = number - default = 3 + default = 900 } \ No newline at end of file