Posted On: Nov 18, 2019
You can now develop Amazon Lambda functions using Java 11. You can use Java 11 features such as its improved HTTP Client API and new methods for reading and writing strings when authoring your functions. Lambda functions written in Java 11 run on Amazon Linux 2, the latest generation of Amazon Linux, and Amazon Corretto 11, a no-cost, production-ready distribution of OpenJDK 11 that comes with long-term support.
Amazon Lambda is a compute service that lets you run code without provisioning or managing servers. With Amazon Lambda, you can run code for virtually any type of Java application or backend service - all with zero administration. You can use your existing tools such as Eclipse or IntelliJ IDEA to author Java code and use Maven for packaging your Java code, making it easy to integrate Amazon Lambda into your existing development processes.
To get started, just upload your code through the Amazon Lambda console or CLI and select the Java 11 runtime. You can also use the Amazon Serverless Application Model (SAM) to deploy and manage your serverless application authored in Java. If you have existing Java 8 functions you can migrate them to the new runtime by making any required code changes to ensure compatibility with Java 11 and Amazon Linux 2. Then edit the function runtime configuration to Java 11. You can read more about the Java programming model in the Amazon Lambda documentation.