Skip to content

Feat/terraform executor timeout #280

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

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
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: 1 addition & 1 deletion terraform/module/json_files/state_machine.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"Type": "Task",
"Resource": "${executorArn}",
"End": true,
"TimeoutSeconds": 30,
"TimeoutSeconds": ${totalExecutionTimeout},
"Retry": [{
"ErrorEquals": ["States.ALL"],
"IntervalSeconds": 3,
Expand Down
2 changes: 1 addition & 1 deletion terraform/module/lambda.tf
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ resource "aws_lambda_function" "executor" {
handler = "executor.handler"
layers = [aws_lambda_layer_version.lambda_layer.arn]
memory_size = 128
timeout = 30
timeout = var.total_execution_timeout

# The filebase64sha256() function is available in Terraform 0.11.12 and later
# For Terraform 0.11.11 and earlier, use the base64sha256() function and the file() function:
Expand Down
1 change: 1 addition & 0 deletions terraform/module/locals.tf
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ locals {
initializerArn = aws_lambda_function.initializer.arn,
publisherArn = aws_lambda_function.publisher.arn,
executorArn = aws_lambda_function.executor.arn,
totalExecutionTimeout = var.total_execution_timeout
cleanerArn = aws_lambda_function.cleaner.arn,
analyzerArn = aws_lambda_function.analyzer.arn,
optimizerArn = aws_lambda_function.optimizer.arn
Expand Down
7 changes: 7 additions & 0 deletions terraform/module/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ variable "lambda_function_prefix" {
description = "Prefix used for the names of Lambda functions, Step Functions state machines, IAM roles, and IAM policies."
}

variable "executor_function_timeout" {
default = 30
type = number
description = "Timeout for the executor function"
}


variable "role_path_override" {
default = ""
type = string
Expand Down