AWS allows to create Lambda function with Java 8
(OpenJDK 8) as runtime.
I need to create a simple function using Open JDK 11
. Something like that:
package example;
import com.amazonaws.services.lambda.runtime.Context;
import com.amazonaws.services.lambda.runtime.LambdaLogger;
public class Hello {
public String myHandler(int myCount, Context context) {
LambdaLogger logger = context.getLogger();
logger.log("received : " + myCount);
return String.valueOf(myCount);
}
}
There is an option allowing to use a custom runtime and a tutorial that contains an example with Shell. However there is no example with Java
.
Is anyone have already deal with an AWS lambda with custom java runtime?