From bcfdc53f9012c14747ab747e90eb99e817435d9d Mon Sep 17 00:00:00 2001 From: Noah Berman Date: Wed, 27 May 2026 10:29:50 -0500 Subject: [PATCH] Update lambda to al2023 --- cdk/deepalert-stack.ts | 2 +- test/stack/deepalert.test.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cdk/deepalert-stack.ts b/cdk/deepalert-stack.ts index 6cceb01..f121e13 100644 --- a/cdk/deepalert-stack.ts +++ b/cdk/deepalert-stack.ts @@ -147,7 +147,7 @@ export class DeepAlertStack extends cdk.Stack { throw new Error(`Lambda asset not found for "${config.funcName}": ${assetPath} (run "make build" first)`); } const f = new lambda.Function(this, config.funcName, { - runtime: lambda.Runtime.PROVIDED_AL2, + runtime: new lambda.Runtime('provided.al2023', lambda.RuntimeFamily.OTHER), handler: "bootstrap", code: lambda.Code.fromAsset(assetPath), role: lambdaRole, diff --git a/test/stack/deepalert.test.ts b/test/stack/deepalert.test.ts index b79d239..bed21d0 100644 --- a/test/stack/deepalert.test.ts +++ b/test/stack/deepalert.test.ts @@ -50,10 +50,10 @@ describe("DeepAlertStack", () => { let stack: cdk.Stack; beforeAll(() => { stack = makeStack(); }); - test("creates all 8 core Lambda functions with PROVIDED_AL2 runtime", () => { + test("creates all 8 core Lambda functions with provided.al2023 runtime", () => { expectCDK(stack).to(countResources("AWS::Lambda::Function", 8)); expectCDK(stack).to(haveResourceLike("AWS::Lambda::Function", { - Runtime: "provided.al2", + Runtime: "provided.al2023", Handler: "bootstrap", })); });