-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
java: Lambda Code.asset does not recognize jar as a zip file #1294
Comments
Are you using |
Sure, here's the snippet:
If I rename the jar file to |
Looking at CDK code, a quick fix would be to update the following to also accept jar extension: https://github.com/awslabs/aws-cdk/blob/master/packages/%40aws-cdk/assets/lib/asset.ts#L93 |
Yes, makes sense. Thanks for reporting, I misread the original description that the problem is that JARs are not supported. |
I'll be glad to contribute the fix for this. I'll have a PR in the next couple of days. |
I attempted to create a Lambda function and passing a path to a jar file to the
withCode
and got an exception:Asset must be a .zip file or a directory
.The asset validation should pass if the path points to a valid jar file (which is essentially a zip file).
As a workaround I found that by simply renaming the file from app.jar to app.zip gets past the validation.
The text was updated successfully, but these errors were encountered: