From 1d7fa70966a4c5c59c9985fee792ea6255c86132 Mon Sep 17 00:00:00 2001 From: "daichi.sugiyama" Date: Sat, 8 Nov 2025 11:56:40 +0900 Subject: [PATCH 1/2] migrate_runtime_from_go1.x_to_amazon_linux_2023 --- eventbridge-schedule-to-lambda-terraform-go/main.tf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 } From fdfb07d3b72b84abe2eb6c113ae6649d1c29b1c3 Mon Sep 17 00:00:00 2001 From: "daichi.sugiyama" Date: Sat, 8 Nov 2025 12:41:41 +0900 Subject: [PATCH 2/2] fix_readme --- eventbridge-schedule-to-lambda-terraform-go/README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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