Handler parameter unmarshalling not working #2
Comments
Ok, some more investigation...
Will try some other things and report back... |
Some more investigation: If I unmarshal the exact same JSON data on The exact same code, on Lambda, blocks forever. Could this be (another) issue related to the code being deployed as a Go Plugin? |
OK, now this is weird. If I literally copy and paste the types EDIT: it became even more strange. I created a package in my project, ddbevt, and I copied the 4 .go files from aws-lambda-go-event, into my ddbevt package, and then tried to unmarshal. it does work. There seems to be something about the dynamodbstreamsevt package that is breaking something? |
@bfreis thank you very much for reporting this issue. I confirm that this is a bug and I've tested with go1.8beta2 all things work but with the update to go1.8rc1 the bug appears. |
@bfreis here is the issue golang/go#18676. As you can see, the situation is as weird as you've described. |
@bfreis the issue is like "resolved" as the patch provided by the golang team works. But I cannot provide a Docker image for now because I have to rebuild the golang std lib from sources and I do not really want to provide a docker image with a custom build of golang. Golang team will integrate the patch in the next rc and I will update the docker image as soon as the rc is released. Sorry for the inconvenience. |
No worries, @fsenart . Thanks for your support! I'm still quite surprised by how weird this issue is! Glad it should be fixed soon in a future Golang release :) Cheers! |
@bfreis issue resolved, have fun (docker pull ...) ;) EDIT: we've also updated eawsy/aws-lambda-go-event, do not forget |
Hi!
I was trying to use the automatic parameter unmarshalling, but it doesn't seem to work.
I'm using the eawsy/aws-lambda-go-event repo for the event objects. Consider the following handler:
When I deploy and run this lambda function, a few weird symptoms:
If I simply change
event *dynamodbstreamsevt.Event
toevent json.RawMessage
(and, naturally, remove the import of dynamodbstreamsevt), the code runs successfully and prints the byte array.The event I'm sending through the Lambda dashboard to test the function is a sample DynamoDB Update event.
Any ideas?
Thanks!
Bruno
The text was updated successfully, but these errors were encountered: