Posted On: Aug 12, 2020

You can now develop Amazon Lambda functions using Java 8 (Corretto). Amazon Corretto 8 is a no-cost, production-ready distribution of OpenJDK 8 that comes with long-term support. Lambda functions written in Java 8 (Corretto) run on Amazon Linux 2, the latest generation of Amazon Linux. You can read more about the Java programming model in the Amazon Lambda documentation

Corretto 8 is designed as a drop-in replacement for OpenJDK 8. Amazon provides patches for Corretto 8 which are not yet integrated in the corresponding OpenJDK update projects. These patches include security fixes, performance enhancements (for example, speeding up frequently-used functions), garbage collection scheduling, and preventing out-of-memory situations, as well as improved monitoring, reporting, and thread management. 

To get started, upload your code through the Amazon Lambda console and select the Java 8 (Corretto) runtime. You can also use Amazon CLI, Amazon Serverless Application Model (SAM) and Amazon CloudFormation for deploying and managing your serverless applications authored in Java 8 (Corretto). To migrate existing Amazon Lambda functions running in OpenJDK 8 to Java 8 (Corretto), update your code to be compatible with Amazon Linux 2, and then update the function runtime to Java 8 (Corretto). 

The Java 8 (Corretto) runtime is available in the Amazon Web Services China (Beijing) Region, operated by Sinnet, and Amazon Web Services China (Ningxia) Region, operated by NWCD. Please visit our product page for more information about Amazon Lambda or log in to the Amazon Lambda console to get started.