Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Lambda binary filename #77

Merged
merged 1 commit into from
Jan 7, 2024
Merged
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
Update Lambda binary filename
  • Loading branch information
conradhodge committed Jan 7, 2024
commit 38610578385f6b0a7c71d72ccb454589113db150
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/

4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion infrastructure/lib/constructs/get-next-tram-lambda.ts
Original file line number Diff line number Diff line change
@@ -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),
Original file line number Diff line number Diff line change
@@ -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: {
2 changes: 1 addition & 1 deletion infrastructure/test/next-next-tram.test.ts
Original file line number Diff line number Diff line change
@@ -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: {
Loading