diff --git a/lib/plugins/aws/invoke-local/index.js b/lib/plugins/aws/invoke-local/index.js index a21dfadb9..c7e925119 100644 --- a/lib/plugins/aws/invoke-local/index.js +++ b/lib/plugins/aws/invoke-local/index.js @@ -262,6 +262,7 @@ class AwsInvokeLocal { 'python3.11', 'python3.12', 'python3.13', + 'python3.14', ].includes(runtime) ) { const handlerComponents = handler.split(/\./); diff --git a/lib/plugins/aws/provider.js b/lib/plugins/aws/provider.js index d1188e493..3a1c57941 100644 --- a/lib/plugins/aws/provider.js +++ b/lib/plugins/aws/provider.js @@ -648,6 +648,7 @@ class AwsProvider { 'python3.11', 'python3.12', 'python3.13', + 'python3.14', 'ruby2.7', 'ruby3.2', 'ruby3.3', diff --git a/test/unit/lib/plugins/aws/invoke-local/index.test.js b/test/unit/lib/plugins/aws/invoke-local/index.test.js index 35e53dd11..c603d74a6 100644 --- a/test/unit/lib/plugins/aws/invoke-local/index.test.js +++ b/test/unit/lib/plugins/aws/invoke-local/index.test.js @@ -495,6 +495,17 @@ describe('AwsInvokeLocal', () => { ).to.be.equal(true); }); + it('should call invokeLocalPython when python3.14 runtime is set', async () => { + awsInvokeLocal.options.functionObj.runtime = 'python3.14'; + await awsInvokeLocal.invokeLocal(); + // NOTE: this is important so that tests on Windows won't fail + const runtime = process.platform === 'win32' ? 'python.exe' : 'python3.14'; + expect(invokeLocalPythonStub.calledOnce).to.be.equal(true); + expect( + invokeLocalPythonStub.calledWithExactly(runtime, 'handler', 'hello', {}, undefined) + ).to.be.equal(true); + }); + it('should call invokeLocalJava when java8 runtime is set', async () => { awsInvokeLocal.options.functionObj.runtime = 'java8'; await awsInvokeLocal.invokeLocal(); diff --git a/types/index.d.ts b/types/index.d.ts index 901cd73fd..888c3cb83 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -74,6 +74,7 @@ export type AwsLambdaRuntime = | "python3.11" | "python3.12" | "python3.13" + | "python3.14" | "ruby2.7" | "ruby3.2" | "ruby3.3"