diff --git a/lambdas/EmailProcessor/EmailRequestPreProcessorFunction/iac/lambda.tf b/lambdas/EmailProcessor/EmailRequestPreProcessorFunction/iac/lambda.tf index d2ffbba..57ad5a6 100644 --- a/lambdas/EmailProcessor/EmailRequestPreProcessorFunction/iac/lambda.tf +++ b/lambdas/EmailProcessor/EmailRequestPreProcessorFunction/iac/lambda.tf @@ -1,17 +1,32 @@ data "aws_caller_identity" "current" {} module "lambda_function_container_image" { - timeout = 60 - source = "terraform-aws-modules/lambda/aws" - handler = "com.levio.awsdemo.emailrequestpreprocessor.App::handleRequest" - runtime = "java17" + # source = "terraform-aws-modules/lambda/aws" + # function_name = local.lambda_function_name + # handler = "index.lambda_handler" + # publish = true + # runtime = local.runtime + # timeout = local.timeout + # layers = [local.powertools_layer_arn] + # source_path = "${path.module}/src" + # s3_bucket = var.lambda_storage_bucket + # memory_size = 256 + # role_name = "${local.lambda_function_name}-role" + # attach_policy_statements = true + + + + source = "terraform-aws-modules/lambda/aws" + handler = "com.levio.awsdemo.emailrequestpreprocessor.App::handleRequest" + publish = true + runtime = "java17" + timeout = 60 function_name = var.lambda_function_name - create_package = false memory_size = 1024 role_name = "${var.lambda_function_name}-role" attach_policy_statements = true s3_bucket = var.lambda_storage_bucket - source_path = "${path.module}/target" + source_path = "${path.module}/target" environment_variables = { diff --git a/lambdas/email_receipt_confirmation/lambda.tf b/lambdas/email_receipt_confirmation/lambda.tf index 7e7171b..a08974d 100644 --- a/lambdas/email_receipt_confirmation/lambda.tf +++ b/lambdas/email_receipt_confirmation/lambda.tf @@ -11,19 +11,14 @@ data "aws_caller_identity" "current" {} module "lambda_function_container_image" { source = "terraform-aws-modules/lambda/aws" - function_name = local.lambda_function_name handler = "index.lambda_handler" publish = true - runtime = local.runtime timeout = local.timeout layers = [local.powertools_layer_arn] - source_path = "${path.module}/src" s3_bucket = var.lambda_storage_bucket - - memory_size = 256 role_name = "${local.lambda_function_name}-role" attach_policy_statements = true