-
Notifications
You must be signed in to change notification settings - Fork 239
S3Events are not deserialized via AWS Lambda RequestHandler APIs #151
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
Comments
Hi @AjitDas - what environment is this exception being thrown in? Was this running in Lambda or elsewhere? |
Hi @carlzogh this error is coming on my local SAM testing, I have not deployed my code to AWS environment yet. Having said that I think this will come in AWS lambda env as well since serialization would be done same way just like my local SAM testing. Also FYI am using this along with spring framework. I was able to test with other type of events like |
I'm facing the same issue. My workaround was to recompile Maven has support for the switch so the workaround could be easily incorporated to the project by default.
Note that with older Jackson, one must have an accompanying module to support this (and of course take constructors with multiple parameters into consideration which Jackson doesn't do by default). I verified with it that the arguments got their names via refection by debugging |
I forgot to mention that Perhaps a pull request for Jackson's BTW: There's an alternative JDK7 based |
Having still the ability to parse There would be also the official JSON-B that give the capabilities analogous to what Jackson annotations used to provide in previous versions. I think that even Jackson 2.11 could be then used as a JSON-P parser for Yasson that is the RI for the JSON-B standard. |
I think this will resolve your problem. https://github.com/aws/aws-lambda-java-libs/tree/master/aws-lambda-java-tests |
I think what @CraigGoodspeed is trying to point out is this module:
Which you can use like this:
|
@rehevkor5 for some reason I was having trouble with that solution on the AWS lambda environment though it worked fine on my machine -- it couldn't find the S3EventNotification class. I tried a few things but in the end this worked for me, so I've settled for it: |
Thanks a lot, this saved me a lot of trouble. |
@mo-rjr Use Ref: #262 (comment) |
I am facing issue while de-serializing JSON to
S3Event
with Jackson APis throwing error because of non compliant POJO models for theseS3Event
classes.Error received after executing the S3Event JSON is something like this.
Can we have simple POJOs version of this
S3Event
so that it can be de-serialized accordingly.The text was updated successfully, but these errors were encountered: