Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions eventbridge-schedule-to-lambda-terraform-go/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
```
Expand Down Expand Up @@ -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
SPDX-License-Identifier: MIT-0
6 changes: 3 additions & 3 deletions eventbridge-schedule-to-lambda-terraform-go/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down