Skip to content

Commit

Permalink
adding handler and runtime for zip test
Browse files Browse the repository at this point in the history
  • Loading branch information
haitchison committed Dec 19, 2023
1 parent 5166dff commit 6d73b6f
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
2 changes: 2 additions & 0 deletions test/unit-test/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ module "lambda_function_in_vpc" {
package_type = "Zip"
filename = data.archive_file.lambda-zip.output_path
source_code_hash = data.archive_file.lambda-zip.output_base64sha256
handler = "test.lambda_handler"
runtime = "python3.8"
tags = local.tags
function_name = "lambda-function-in-vpc-test"
create_role = true
Expand Down
2 changes: 1 addition & 1 deletion test/unit-test/test-zip/test.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import sys


def handler(event, context):
def lambda_handler(event, context):
return 'Hello from AWS Lambda using Python' + sys.version + '!'
12 changes: 12 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,18 @@ variable "source_code_hash" {
default = null
}

variable "handler" {
description = "Lambda Function entrypoint in your code"
type = string
default = ""
}

variable "runtime" {
description = "Lambda function runtime"
type = string
default = ""
}

variable "timeout" {
description = "The amount of time your Lambda Function has to run in seconds."
type = number
Expand Down

0 comments on commit 6d73b6f

Please sign in to comment.