AWS Lambda now supports Java 8 (Corretto)

Posted on: Aug 12, 2020

You can now develop AWS 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 AWS 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 AWS Lambda console and select the Java 8 (Corretto) runtime. You can also use AWS CLI, AWS Serverless Application Model (SAM) and AWS CloudFormation for deploying and managing your serverless applications authored in Java 8 (Corretto). To migrate existing AWS 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 all Regions where Lambda is available. Please visit our product page for more information about AWS Lambda or log in to the AWS Lambda console to get started.