Can any one help me with syntax to deploy a Java Lambda using Python CDK code? Below is the python CDK code snippet Iam using to deploy Python written Lambda.
handler = lmb.Function(self, 'Handler',
runtime=lmb.Runtime.PYTHON_3_7,
handler='handler.handler',
code=lmb.Code.from_asset(path.join(this_dir, 'lambda')))
And below is the Java CDK code snippet my colleague using:
Function javafunc = new Function(this, CommonFunctions.getPropValues("HANDLER"),
FunctionProps.builder()
.runtime(Runtime.JAVA_8)
.handler(CommonFunctions.getPropValues("Java_LAMBDA"))
.code(Code.fromAsset(tmpBinDir + "/"+CommonFunctions.getPropValues("JAR_FILE_NAME")))
.timeout(Duration.seconds(300))
.memorySize(512)
.functionName(CommonFunctions.getPropValues("FUNCTION_NAME"))
.build());
I don't know Java and I have requirement to deploy Java compiled Lambda jar using Python CDK.