Skip to content

Commit

Permalink
Merge pull request #13 from constanca-m/add-timeout
Browse files Browse the repository at this point in the history
Add lambda timeout option
  • Loading branch information
constanca-m authored Jun 27, 2024
2 parents f70f44b + 77442cf commit 55d8d3d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@ The `config.yaml` placed inside the bucket will be:
| <a name="input_inputs"></a> [inputs](#input\_inputs) | List of inputs to ESF. If none given, make sure to set config-file-local-path variable.<br>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. | <pre>list(object({<br> type = string<br> id = string<br> outputs = list(object({<br> type = string<br> args = object({<br> elasticsearch_url = optional(string)<br> logstash_url = optional(string)<br> cloud_id = optional(string)<br> api_key = optional(string)<br> username = optional(string)<br> password = optional(string)<br> es_datastream_name = string<br> batch_max_actions = optional(number)<br> batch_max_bytes = optional(number)<br> ssl_assert_fingerprint = optional(string)<br> compression_level = optional(string)<br> })<br> }))<br> }))</pre> | `[]` | no |
| <a name="input_kms-keys"></a> [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 |
| <a name="input_lambda-name"></a> [lambda-name](#input\_lambda-name) | ESF Lambda function name | `string` | n/a | yes |
| <a name="input_lambda-timeout"></a> [lambda-timeout](#input\_lambda-timeout) | The amount of time your Lambda Function has to run in seconds. | `number` | `3` | no |
| <a name="input_log_level"></a> [log\_level](#input\_log\_level) | Log level for ESF | `string` | `"INFO"` | no |
| <a name="input_release-version"></a> [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 |
| <a name="input_s3-buckets"></a> [s3-buckets](#input\_s3-buckets) | List of S3 bucket ARNs that are sources for the S3 SQS Event Notifications | `list(string)` | `[]` | no |
Expand All @@ -225,4 +226,5 @@ The `config.yaml` placed inside the bucket will be:
| <a name="output_esf-replay-queue"></a> [esf-replay-queue](#output\_esf-replay-queue) | Name of the ESF replay queue. |
| <a name="output_esf-replay-queue-dlq"></a> [esf-replay-queue-dlq](#output\_esf-replay-queue-dlq) | Name of the Dead Letter Queue for the ESF replay queue. |


<!-- END_TF_DOCS -->
1 change: 1 addition & 0 deletions esf.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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 = 900
}

0 comments on commit 55d8d3d

Please sign in to comment.