diff --git a/docs/guides/functions.md b/docs/guides/functions.md index f90ba1e93..6490197cc 100644 --- a/docs/guides/functions.md +++ b/docs/guides/functions.md @@ -152,7 +152,7 @@ deleteFoo: The `runtime` property (set at `provider.runtime` or per function) accepts a fixed set of identifiers that map to the [AWS Lambda runtimes](https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html). The supported identifiers, grouped by language, are: - **Node.js:** `nodejs20.x`, `nodejs22.x`, `nodejs24.x` -- **Python:** `python3.10`, `python3.11`, `python3.12`, `python3.13`, `python3.14` +- **Python:** `python3.10`, `python3.11`, `python3.12`, `python3.13`, `python3.14`, `python3.15` - **Java:** `java8.al2`, `java8.al2023`, `java11`, `java11.al2023`, `java17`, `java17.al2023`, `java21`, `java25` - **Ruby:** `ruby3.3`, `ruby3.4`, `ruby4.0` - **.NET:** `dotnet8`, `dotnet9`, `dotnet10` diff --git a/lib/plugins/aws/invoke-local/index.js b/lib/plugins/aws/invoke-local/index.js index 81d2afe49..f964ad6e3 100644 --- a/lib/plugins/aws/invoke-local/index.js +++ b/lib/plugins/aws/invoke-local/index.js @@ -365,7 +365,11 @@ class AwsInvokeLocal { ); } - if (['python3.10', 'python3.11', 'python3.12', 'python3.13', 'python3.14'].includes(runtime)) { + if ( + ['python3.10', 'python3.11', 'python3.12', 'python3.13', 'python3.14', 'python3.15'].includes( + runtime + ) + ) { const handlerComponents = handler.split(/\./); const handlerPath = handlerComponents.slice(0, -1).join('.'); const handlerName = handlerComponents.pop(); diff --git a/lib/plugins/aws/provider.js b/lib/plugins/aws/provider.js index ff91e9a96..88a91eb79 100644 --- a/lib/plugins/aws/provider.js +++ b/lib/plugins/aws/provider.js @@ -573,6 +573,7 @@ class AwsProvider { 'python3.12', 'python3.13', 'python3.14', + 'python3.15', 'ruby3.3', 'ruby3.4', 'ruby4.0', 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 aff08c6b0..d126d4b9a 100644 --- a/test/unit/lib/plugins/aws/invoke-local/index.test.js +++ b/test/unit/lib/plugins/aws/invoke-local/index.test.js @@ -1056,6 +1056,17 @@ describe('AwsInvokeLocal', () => { ).to.be.equal(true); }); + it('should call invokeLocalPython when python3.15 runtime is set', async () => { + awsInvokeLocal.options.functionObj.runtime = 'python3.15'; + await awsInvokeLocal.invokeLocal(); + // NOTE: this is important so that tests on Windows won't fail + const runtime = process.platform === 'win32' ? 'python.exe' : 'python3.15'; + expect(invokeLocalPythonStub.calledOnce).to.be.equal(true); + expect( + invokeLocalPythonStub.calledWithExactly(runtime, 'handler', 'hello', {}, undefined) + ).to.be.equal(true); + }); + [ 'java8.al2', 'java8.al2023', diff --git a/types/index.d.ts b/types/index.d.ts index 06b2482ef..e173f71d8 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -72,6 +72,7 @@ export type AwsLambdaRuntime = | 'python3.12' | 'python3.13' | 'python3.14' + | 'python3.15' | 'ruby3.3' | 'ruby3.4' | 'ruby4.0';