Created
October 20, 2022 19:56
-
-
Save mxro/e33db61e3cb82a394dde6fd2f0e48abf to your computer and use it in GitHub Desktop.
lambda.tf
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
resource "aws_lambda_function" "this" { | |
for_each = var.lambdas | |
function_name = lookup(each.value, "function_name", null) | |
filename = data.archive_file.empty_lambda.output_path | |
handler = "lambda.handler" | |
runtime = "nodejs16.x" | |
memory_size = 2048 | |
timeout = 27 # default Gateway timeout is 29 s | |
role = aws_iam_role.lambda_exec.arn | |
lifecycle { | |
ignore_changes = [ | |
filename, | |
] | |
} | |
environment { | |
variables = { | |
GOLDSTACK_DEPLOYMENT = var.name | |
CORS = var.cors | |
NODE_OPTIONS = "--enable-source-maps" | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment