Skip to content

Instantly share code, notes, and snippets.

@mxro
Created November 26, 2021 20:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mxro/f8992c4e812e4985265f562558da0276 to your computer and use it in GitHub Desktop.
Save mxro/f8992c4e812e4985265f562558da0276 to your computer and use it in GitHub Desktop.
resource "aws_lambda_function" "main" {
function_name = var.lambda_name
filename = data.archive_file.empty_lambda.output_path
handler = "lambda.handler"
runtime = "nodejs12.x"
memory_size = 2048
timeout = 900
role = aws_iam_role.lambda_exec.arn
lifecycle {
ignore_changes = [
filename,
]
}
environment {
variables = {
GOLDSTACK_DEPLOYMENT = var.name
CORS = var.cors
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment