diff --git a/eventbridge-schedule-to-lambda-terraform-go/README.md b/eventbridge-schedule-to-lambda-terraform-go/README.md index 39c6c2f8b..0a9e05a07 100644 --- a/eventbridge-schedule-to-lambda-terraform-go/README.md +++ b/eventbridge-schedule-to-lambda-terraform-go/README.md @@ -34,11 +34,11 @@ Important: this application uses various AWS services and there are costs associ ``` 1. Compile the main.go file to create an executable: ``` - GOOS=linux GOARCH=amd64 go build -o main main.go + GOOS=linux GOARCH=amd64 go build -o bootstrap main.go ``` 1. Create a zip file with the Go executable file: ``` - zip main.zip main + zip myFunction.zip bootstrap ``` 1. Change directory back into the pattern directory: ``` @@ -74,4 +74,4 @@ After deployment, you can verify the schedule is invoking the Lambda function by ---- Copyright 2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. -SPDX-License-Identifier: MIT-0 \ No newline at end of file +SPDX-License-Identifier: MIT-0 diff --git a/eventbridge-schedule-to-lambda-terraform-go/main.tf b/eventbridge-schedule-to-lambda-terraform-go/main.tf index e70a54e66..591abb42f 100644 --- a/eventbridge-schedule-to-lambda-terraform-go/main.tf +++ b/eventbridge-schedule-to-lambda-terraform-go/main.tf @@ -15,16 +15,16 @@ data "aws_caller_identity" "current" {} data "archive_file" "LambdaZipFile" { type = "zip" - source_file = "${path.module}/src/main" + source_file = "${path.module}/src/bootstrap" output_path = "${path.module}/eventbridge_go_function.zip" } resource "aws_lambda_function" "eventbridge_function" { function_name = "EventBridgeScheduleTarget" filename = data.archive_file.LambdaZipFile.output_path - handler = "main" + handler = "bootstrap" role = aws_iam_role.iam_for_lambda.arn - runtime = "go1.x" + runtime = "provided.al2023" memory_size = 128 timeout = 30 }