Quarkus Null Pointer Exception while invoking lambda from aws console for S3 Event #25590
parasjain27031994
started this conversation in
Community
Replies: 1 comment
-
Invoking locally using sam is also not able to bind the s3Event object from JSON to the handler, below are the logs from SAM local execution :
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I created a lambda function using quarkus native, however if I manually invoke the lambda function via IntelliJ using AWS plugin, I get null pointer exception.
A different behavior is observed, if I upload the resultant
function.zip
obtained after runningmvn package -Dnative -Dquarkus.native.container-build=true
command to AWS, while using the aws console by passing the S3 event json in the "Test" section, the JSON is not resolved to the S3Event object, hence if I print the event I get an empty object in console.However if the same is invoked automatically by creating an s3 trigger it works fine.
This is hindering for debugging the lambda function locally using an IDE. Any reason why the same event json if passed manually is not getting resolved by Quarkus ?
Below is the Lambda Handler :
}
S3 Event JSON :
Exception :
After reading through the exception, it seems it is not able to resolve @Inject attribute, hence the ObjectMapper and S3Client bean are not being injected while invoking manually.
However executing over AWS the beans are resolving but the s3Evevent is not getting resolved.
Any idea, how to resolve this to be able to debug locally ?
Beta Was this translation helpful? Give feedback.
All reactions