You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When creating a lambda function using CDK Java, if the lambda jar file path mentioned as "" in the Code parameter, the synth/diff/deploy process initiates an infinite recursive creation of directories "cdk.out/asset-xxx/cdk.out/asset-xxx/,,,".
It throws an error at the end when the file path is too deep. There is no warning if the asset folder is not mentioned.
Also this leads to a blue screen when the project is opened in Eclipse.
Please fix this issue.
Expected Behavior
Throw an error that the asset path is not provided.
Current Behavior
Creation of infinite nested folders.
Reproduction Steps
FunctionProps props = FunctionProps.builder()
.code(Code.fromAsset(""))
.handler("com.example.action.handler.MyAction")
.functionName("MyFunction")
.runtime(Runtime.JAVA_11)
.logRetention(RetentionDays.ONE_WEEK)
.role(f1Role)
.build();
Function f1 = new Function(this,"Fun", props);
Possible Solution
Stop the synthesis and throw an error message that the asset path cannot be a zero-lenth string.