AWS Lambda layer to enable Java 17 support
- Create a function using the PROVIDED_AL2 runtime.
- Add this layer to your function.
A custom JRE is created to reduce final file size. Lambda has a 250MB unzipped file size limit.
Dockerfile describes how the JRE is built
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
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/*