Skip to content

Commit

Permalink
Update Lambda binary filename
Browse files Browse the repository at this point in the history
  • Loading branch information
conradhodge committed Jan 7, 2024
1 parent 94a3cb2 commit 9f22f7b
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Go
coverage.out
lambda/*/handler.zip
lambda/*/main
lambda/*/bootstrap
mock/
bin/

Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ DIRS=$(shell find lambda/* -type d)
.PHONY: builders $(DIRS)
builders: $(DIRS) ## Build all the underlying lambdas

$(DIRS): ## Build each lambda
cd $@ && GOOS=linux go build -o main ./...
$(DIRS): ## Build each lambda - https://www.wolfe.id.au/2023/08/09/rip-aws-go-lambda-runtime/#why-is-this-hard
cd $@ && GOOS=linux go build -o bootstrap ./...

.PHONY: build-cdk
build-cdk: ## Build the CDK stacks
Expand Down
2 changes: 1 addition & 1 deletion infrastructure/lib/constructs/get-next-tram-lambda.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export class GetNextTramLambda extends Construct {
functionName: name + "-lambda",
description: "Lambda function that will get the next tram",
code: lambda.Code.fromAsset("lambda/get-next-tram"),
handler: "main",
handler: "bootstrap",
runtime: lambda.Runtime.PROVIDED_AL2,
memorySize: props.memorySize,
timeout: Duration.seconds(props.timeout),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ test("Lambda is created with parameters given", () => {
template.hasResourceProperties("AWS::Lambda::Function", {
FunctionName: "get-next-tram-lambda",
Description: "Lambda function that will get the next tram",
Handler: "main",
Handler: "bootstrap",
Runtime: "provided.al2",
Environment: {
Variables: {
Expand Down
2 changes: 1 addition & 1 deletion infrastructure/test/next-next-tram.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ test("Stack is created with lambda", () => {
template.hasResourceProperties("AWS::Lambda::Function", {
FunctionName: "get-next-tram-lambda",
Description: "Lambda function that will get the next tram",
Handler: "main",
Handler: "bootstrap",
Runtime: "provided.al2",
Environment: {
Variables: {
Expand Down

0 comments on commit 9f22f7b

Please sign in to comment.