Skip to content

Commit c0dcea2

Browse files
committed
Work in progress
1 parent 8e2372f commit c0dcea2

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

main.tf

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,18 @@ locals {
66
lambda_runtime = "python${var.lambda_python_version}"
77
}
88

9+
data "archive_file" "placeholder" {
10+
type = "zip"
11+
source_dir = "${path.module}/placeholder"
12+
output_path = "/tmp/placeholder.zip"
13+
}
14+
915
resource "aws_lambda_function" "lambda" {
1016
function_name = local.lambda_name_camel
1117
description = var.lambda_description
1218
role = var.lambda_iam_role_arn
1319
handler = var.lambda_handler
20+
filename = data.archive_file.placeholder.output_path
1421
runtime = local.lambda_runtime
1522
memory_size = var.lambda_memory
1623
timeout = var.lambda_timeout

placeholder/handler.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Placeholder Lambda function code for deployment via Terraform
2+
def handler(event, context):
3+
raise Exception('Lambda function code has not been uploaded')

0 commit comments

Comments
 (0)