Lambda native does not work if it has dependency on quarkus-resteasy
See original GitHub issueDescribe the bug
Following lambda guide works perfectly in native mode. But when adding dependency on io.quarkus:quarkus-resteasy it fails with
java.lang.IllegalStateException: Failed to create cache dir at io.vertx.core.file.impl.FileResolver.setupCacheDir(FileResolver.java:332) at io.vertx.core.file.impl.FileResolver.<init>(FileResolver.java:87) at io.vertx.core.impl.VertxImpl.<init>(VertxImpl.java:165)
Found this (already fixed) bug that provided workaroud with forcing java.tmpdir to /tmp. Hovever the official 1.0.0.Final guide (and maven archetype) does not use additional sh bootstrap file, but simply renames native executable to bootstrap. On the side note, local invocation of lambda function with AWS SAM framework works without problem.
Expected behavior Guide and archetype should provide valid infrormation.
To Reproduce Steps to reproduce the behavior:
- Create aws lambda project found here: https://quarkus.io/guides/amazon-lambda
- Add extension quarkus-resteasy to the project and create a resteasy service within the code.
- Build natively and upload to aws lambda.
- execute lambda function
Issue Analytics
- State:
- Created 4 years ago
- Comments:11 (6 by maintainers)
I’m also facing this issue when using the
quarkus-mailer
withquarkus-amazon-lambda
:Based on the information here, my solution was to:
zip.xml
to renamebootstrap
torunner
:bootstrap.sh
file to invoke the native runner with thejava.io.tmpdir
setting:zip.xml
file to include the new bootstrap file:@evanchooly , I agree with you to use amazon lambda http. But I guess there are other components using vertx? @mehdi-reza, local sam invoke shows /var/tmp/ (if not changed with custom bootstrap file), which obviously works within local tests but not in case of actual aws deployment.