From e4dfebdcf66a0f26138f6774b057924128efbfa5 Mon Sep 17 00:00:00 2001 From: Baerten Dennis Date: Sun, 26 Nov 2023 17:10:33 +0100 Subject: [PATCH] feat: Add support for java21 runtime (#12273) (#12274) * feat: Add support for java17 runtime (#12273) * feat: Add support for java21 runtime (#12273) --- docs/providers/aws/guide/functions.md | 2 +- lib/plugins/aws/invoke-local/index.js | 2 +- lib/plugins/aws/provider.js | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/providers/aws/guide/functions.md b/docs/providers/aws/guide/functions.md index 23ac30663a9..81218010860 100644 --- a/docs/providers/aws/guide/functions.md +++ b/docs/providers/aws/guide/functions.md @@ -455,7 +455,7 @@ functions: snapStart: true ``` -**Note:** Lambda SnapStart only supports the Java 11 and Java 17 runtimes and does not support provisioned concurrency, the arm64 architecture, the Lambda Extensions API, Amazon Elastic File System (Amazon EFS), AWS X-Ray, or ephemeral storage greater than 512 MB. +**Note:** Lambda SnapStart only supports the Java 11, Java 17 and Java 21 runtimes and does not support provisioned concurrency, the arm64 architecture, the Lambda Extensions API, Amazon Elastic File System (Amazon EFS), AWS X-Ray, or ephemeral storage greater than 512 MB. ## VPC Configuration diff --git a/lib/plugins/aws/invoke-local/index.js b/lib/plugins/aws/invoke-local/index.js index b22711030b0..250ea55ed35 100644 --- a/lib/plugins/aws/invoke-local/index.js +++ b/lib/plugins/aws/invoke-local/index.js @@ -266,7 +266,7 @@ class AwsInvokeLocal { ); } - if (['java8', 'java11', 'java17'].includes(runtime)) { + if (['java8', 'java11', 'java17', 'java21'].includes(runtime)) { const className = handler.split('::')[0]; const handlerName = handler.split('::')[1] || 'handleRequest'; const artifact = diff --git a/lib/plugins/aws/provider.js b/lib/plugins/aws/provider.js index 329d779f554..29d634607a1 100644 --- a/lib/plugins/aws/provider.js +++ b/lib/plugins/aws/provider.js @@ -616,6 +616,7 @@ class AwsProvider { enum: [ 'dotnet6', 'go1.x', + 'java21', 'java17', 'java11', 'java8',