Skip to content

Commit

Permalink
feat: added python 3.12, java 21 and al2023.
Browse files Browse the repository at this point in the history
Suggested changes by @owenvoke
  • Loading branch information
wilsenhc authored Jan 10, 2024
1 parent 61b4c6e commit 6f4a83b
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 28 deletions.
11 changes: 5 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,20 @@ You can write functions in any of the following runtimes and execute them straig
- Node.js 20
- Node.js 18
- Node.js 16
- Node.js 14
- Python 3.12
- Python 3.11
- Python 3.10
- Python 3.9
- Python 3.8
- Python 3.7
- Ruby 3.2
- Ruby 2.7
- Java 21
- Java 17
- Java 11
- Java 8
- Go 1.x
- .NET 7
- .NET 6
- Custom runtime
- Ruby 3.2
- OS-only runtime (Amazon Linux 2023)
- OS-only runtime (Amazon Linux 2)

Any runtime that [Lambda supports](https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html), you can use!

Expand Down
19 changes: 8 additions & 11 deletions docs/functions/customization.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,32 +10,29 @@ Lambda supports multiple languages through the use of runtimes. You can choose a
- Node.js 20: `nodejs20.x`
- Node.js 18: `nodejs18.x`
- Node.js 16: `nodejs16.x`
- Node.js 14: `nodejs14.x`
- Python 3.12: `python3.12`
- Python 3.11: `python3.11`
- Python 3.10: `python3.10`
- Python 3.9: `python3.9`
- Python 3.8: `python3.8`
- Python 3.7: `python3.7`
- Ruby 3.2: `ruby3.2`
- Ruby 2.7: `ruby2.7`
- Java 21: `java21`
- Java 17: `java17`
- Java 11: `java11`
- Java 8: `java8`
- Java 8 Linux 2: `java8.al2`
- Go 1.x: `go1.x`
- Java 8: `java8.al2`
- .NET 7: `dotnet7`
- .NET 6: `dotnet6`
- Custom runntime: `provided.al2`
- Custom runntime: `provided`
- Ruby 3.2: `ruby3.2`
- OS-only runtime (Amazon Linux 2023): `provided.al2023`
- OS-only runtime (Amazon Linux 2): `provided.al2`

E.g. to use the Go runtime, you would return `go1.x`:
E.g. to use the Python 3.12 runtime, you would return `python3.12`:

```php
class ExampleFunction extends LambdaFunction
{
public function runtime() // [tl! focus:3]
{
return 'go1.x';
return 'python3.12';
}
}
```
Expand Down
11 changes: 5 additions & 6 deletions docs/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,20 @@ You can write functions in any of the following runtimes and execute them straig
- Node.js 20
- Node.js 18
- Node.js 16
- Node.js 14
- Python 3.12
- Python 3.11
- Python 3.10
- Python 3.9
- Python 3.8
- Python 3.7
- Ruby 3.2
- Ruby 2.7
- Java 21
- Java 17
- Java 11
- Java 8
- Go 1.x
- .NET 7
- .NET 6
- Custom runtime
- Ruby 3.2
- OS-only runtime (Amazon Linux 2023)
- OS-only runtime (Amazon Linux 2)

Any runtime that [Lambda supports](https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html), you can use!

Expand Down
22 changes: 17 additions & 5 deletions src/Runtime.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,11 @@ abstract class Runtime

public const NODEJS_16 = 'nodejs16.x';

/** @deprecated */
public const NODEJS_14 = 'nodejs14.x';

public const PYTHON_312 = 'python3.12';

public const PYTHON_311 = 'python3.11';

public const PYTHON_310 = 'python3.10';
Expand All @@ -20,27 +23,36 @@ abstract class Runtime

public const PYTHON_38 = 'python3.8';

/** @deprecated */
public const PYTHON_37 = 'python3.7';

public const RUBY_32 = 'ruby3.2';

public const RUBY_27 = 'ruby2.7';
public const JAVA_21 = 'java21';

public const JAVA_17 = 'java17';

public const JAVA_11 = 'java11';

public const JAVA_8_LINUX2 = 'java8.al2';

/** @deprecated */
public const JAVA_8 = 'java8';

public const GO_1X = 'go1.x';

public const DOT_NET_7 = 'dotnet7';

public const DOT_NET_6 = 'dotnet6';

public const RUBY_32 = 'ruby3.2';

/** @deprecated */
public const RUBY_27 = 'ruby2.7';

/** @deprecated */
public const GO_1X = 'go1.x';

public const PROVIDED_AL2023 = 'provided.al2023';

public const PROVIDED_AL2 = 'provided.al2';

/** @deprecated */
public const PROVIDED = 'provided';
}

0 comments on commit 6f4a83b

Please sign in to comment.