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 runtime #78

Merged
merged 3 commits into from
Jan 7, 2024
Merged
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
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ DIRS=$(shell find lambda/* -type d)
builders: $(DIRS) ## Build all the underlying lambdas

$(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 ./...
cd $@ && GOOS=linux CGO_ENABLED=0 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 @@ -98,7 +98,7 @@ export class GetNextTramLambda extends Construct {
description: "Lambda function that will get the next tram",
code: lambda.Code.fromAsset("lambda/get-next-tram"),
handler: "bootstrap",
runtime: lambda.Runtime.PROVIDED_AL2,
runtime: lambda.Runtime.PROVIDED_AL2023,
memorySize: props.memorySize,
timeout: Duration.seconds(props.timeout),
environment: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ test("Lambda is created with parameters given", () => {
FunctionName: "get-next-tram-lambda",
Description: "Lambda function that will get the next tram",
Handler: "bootstrap",
Runtime: "provided.al2",
Runtime: "provided.al2023",
Environment: {
Variables: {
TRAVELINE_API_USERNAME: "api-username",
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 @@ -23,7 +23,7 @@ test("Stack is created with lambda", () => {
FunctionName: "get-next-tram-lambda",
Description: "Lambda function that will get the next tram",
Handler: "bootstrap",
Runtime: "provided.al2",
Runtime: "provided.al2023",
Environment: {
Variables: {
TRAVELINE_API_USERNAME: "api-username",
Expand Down
1 change: 1 addition & 0 deletions lambda/get-next-tram/tram.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package main
import (
"fmt"
"time"
_ "time/tzdata"

"github.com/conradhodge/travel-api-client/transport"
)
Expand Down
Loading