From 46c2f6918108b823d4b15c86c7ab10787c4fae09 Mon Sep 17 00:00:00 2001 From: Marek Skrajnowski Date: Tue, 9 Mar 2021 15:32:00 +0100 Subject: [PATCH] fix(lambda): don't pass layers, handler or runtime when using a container image --- lambda/main.tf | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/lambda/main.tf b/lambda/main.tf index 0d001744..e252b0d1 100644 --- a/lambda/main.tf +++ b/lambda/main.tf @@ -77,17 +77,18 @@ resource "aws_lambda_function" "lambda" { function_name = var.name + package_type = var.image != null ? "Image" : "Zip" + image_uri = var.image + filename = local.create_package ? module.package.output_path : var.package_path s3_bucket = var.package_s3 != null ? var.package_s3.bucket : null s3_key = var.package_s3 != null ? var.package_s3.key : null s3_object_version = var.package_s3_version - package_type = var.image != null ? "Image" : "Zip" - image_uri = var.image + layers = var.image == null ? var.layer_qualified_arns : null + handler = var.image == null ? var.handler : null + runtime = var.image == null ? var.runtime : null - layers = var.layer_qualified_arns - handler = var.handler - runtime = var.runtime publish = true timeout = var.timeout memory_size = var.memory_size