Skip to content

Commit b962206

Browse files
lgallardShayne Clausson
authored and
Shayne Clausson
committed
Added the timeout parameter for the Lambda function
1 parent 7cf9eb4 commit b962206

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ Module Input Variables
1313
- `handler` - the entrypoint into your Lambda function, in the form of `filename.function_name`
1414
- `schedule_expression` - a [valid rate or cron expression](http://docs.aws.amazon.com/lambda/latest/dg/tutorial-scheduled-events-schedule-expressions.html)
1515
- `iam_policy_document` - a valid IAM policy document used for the Lambda's [execution role](http://docs.aws.amazon.com/lambda/latest/dg/intro-permission-model.html#lambda-intro-execution-role)
16+
- `timeout` - (optional) the amount of time your Lambda Function has to run in seconds. Defaults to 3. See [Limits](https://docs.aws.amazon.com/lambda/latest/dg/limits.html)
1617
- `enabled` - boolean expression. If false, the lambda function and the cloudwatch schedule are not set. Defaults to `true`.
1718

1819
Usage
@@ -59,4 +60,4 @@ Outputs
5960

6061
Author
6162
------
62-
Created and maintained by [Shayne Clausson](https://github.com/sclausson)
63+
Created and maintained by [Shayne Clausson](https://github.com/sclausson)

main.tf

+1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ resource "aws_lambda_function" "lambda" {
3333
handler = "${var.handler}"
3434
source_code_hash = "${var.source_code_hash}"
3535
count = "${var.enabled}"
36+
timeout = "${var.timeout}"
3637
}
3738

3839
resource "aws_lambda_permission" "cloudwatch" {

variables.tf

+4
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,7 @@ variable "iam_policy_document" {}
1515
variable "enabled" {
1616
default = true
1717
}
18+
19+
variable "timeout" {
20+
default = 3
21+
}

0 commit comments

Comments
 (0)