Skip to content

Commit

Permalink
Switch Lambda runtime
Browse files Browse the repository at this point in the history
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/
  • Loading branch information
conradhodge committed Jan 7, 2024
1 parent 39c39e8 commit 94a3cb2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
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: "main",
runtime: lambda.Runtime.PROVIDED_AL2023,
runtime: lambda.Runtime.PROVIDED_AL2,
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: "main",
Runtime: "provided.al2023",
Runtime: "provided.al2",
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: "main",
Runtime: "provided.al2023",
Runtime: "provided.al2",
Environment: {
Variables: {
TRAVELINE_API_USERNAME: "api-username",
Expand Down

0 comments on commit 94a3cb2

Please sign in to comment.