Java 14 support for AWS Lambda

AWS is currently the most popular choice for serverless applications, but the Java Runtime is hopelessly outdated. Why wait for Amazon to fix this, when theres’s a much better solution? The frgaal project is ready to give you all of that in a safe and simple way.

It’s been less than a year that Amazon finally updated it’s Java Lambda runtime to Java 11 and nothing happened since then. Apparently only LTS versions will be supported. If the trend continues, we’ll get a Java 15 Lambda runtime sometime in 2022. Until then, you’ll either have to work with an ancient SDK 11, or wait for Amazon to update their runtime before you can use all the nice new features introduced in versions 12,13,14, and 15 of the SDK. Fortunately there’s now a third option…

frgaal — Babel for Java

frgaal is a retrofitting compiler for Java based on the OpenJDK version of javac. frgaal can run on Java 8 itself and can produce compatible bytecode for Java versions as old as Java 8.


Clone the repository:

$ git clone
$ cd aws-lambda-developer-guide/sample-apps/java-basic

And create a Bucket for the deployment artifacts:

java-basic$ ./
make_bucket: lambda-artifacts-a5e4xmplb5b22e0d

Before we build and deploy we’ll modify the the pom.xml. If you open the pom, you’ll find this section:

Replace it with this to use the frgaal compiler:

We’ll also change the code in and replace the response with a multiline text block, which were introduced in Java 13:


run mvn:

java-basic$ ./ mvn
[INFO] Scanning for projects...
[INFO] -----------------------< com.example:java-basic >-----------------------
[INFO] Building java-basic-function 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------


To do so run the

java-basic$ ./
"StatusCode": 200,
"ExecutedVersion": "$LATEST"
"200 OK\nLook at this multiline text\n..."

The script will continue invoking the lambda, just pressCRTL+C to exit.