From 94a3cb251ab123feb5fc4551b734bbc25b76c695 Mon Sep 17 00:00:00 2001 From: Conrad Hodge Date: Sun, 7 Jan 2024 16:31:28 +0000 Subject: [PATCH] Switch Lambda runtime Got the following error with provided.al2023: INIT_REPORT Init Duration: 0.24 ms Phase: init Status: error Error Type: Runtime.InvalidEntrypoint Switched from provided.al2023 to provided.al2 See https://www.wolfe.id.au/2023/08/09/rip-aws-go-lambda-runtime/ --- infrastructure/lib/constructs/get-next-tram-lambda.ts | 2 +- infrastructure/test/constructs/get-next-tram-lambda.test.ts | 2 +- infrastructure/test/next-next-tram.test.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/infrastructure/lib/constructs/get-next-tram-lambda.ts b/infrastructure/lib/constructs/get-next-tram-lambda.ts index 0d1bb5f..7b9a3bf 100644 --- a/infrastructure/lib/constructs/get-next-tram-lambda.ts +++ b/infrastructure/lib/constructs/get-next-tram-lambda.ts @@ -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: "main", - runtime: lambda.Runtime.PROVIDED_AL2023, + runtime: lambda.Runtime.PROVIDED_AL2, memorySize: props.memorySize, timeout: Duration.seconds(props.timeout), environment: { diff --git a/infrastructure/test/constructs/get-next-tram-lambda.test.ts b/infrastructure/test/constructs/get-next-tram-lambda.test.ts index 75ff5c7..0a959d0 100644 --- a/infrastructure/test/constructs/get-next-tram-lambda.test.ts +++ b/infrastructure/test/constructs/get-next-tram-lambda.test.ts @@ -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: "main", - Runtime: "provided.al2023", + Runtime: "provided.al2", Environment: { Variables: { TRAVELINE_API_USERNAME: "api-username", diff --git a/infrastructure/test/next-next-tram.test.ts b/infrastructure/test/next-next-tram.test.ts index 0d3f747..85dfeb8 100644 --- a/infrastructure/test/next-next-tram.test.ts +++ b/infrastructure/test/next-next-tram.test.ts @@ -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: "main", - Runtime: "provided.al2023", + Runtime: "provided.al2", Environment: { Variables: { TRAVELINE_API_USERNAME: "api-username",