Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add lambda timeout option #13

Merged
merged 3 commits into from
Jun 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
}