forked from marksailes/lambda-java17-layer
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
34 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,36 @@ | ||
# lambda-java17-layer | ||
AWS Lambda layer to enable Java 17 support | ||
|
||
## Usage | ||
|
||
- Create a function using the PROVIDED_AL2 runtime. | ||
- Add this layer to your function. | ||
|
||
## Java 17 | ||
|
||
A custom JRE is created to reduce final file size. Lambda has a 250MB unzipped file size limit. | ||
|
||
[Dockerfile](Dockerfile) describes how the JRE is built | ||
|
||
## JVM Settings | ||
|
||
The following JVM settings are added by default. | ||
|
||
``` | ||
--add-opens java.base/java.util=ALL-UNNAMED | ||
-XX:+TieredCompilation -XX:TieredStopAtLevel=1 | ||
-Xshare:on | ||
``` | ||
|
||
Further suggestions welcomed | ||
|
||
## Java Class Path | ||
|
||
``` | ||
aws-lambda-java-runtime-interface-client-1.1.0.jar | ||
aws-lambda-java-core-1.2.1.jar | ||
aws-lambda-java-serialization-1.0.0.jar | ||
$LAMBDA_TASK_ROOT | ||
$LAMBDA_TASK_ROOT/* | ||
$LAMBDA_TASK_ROOT/lib/* | ||
``` |