On Fri, Feb 22, 2019 at 1:36 AM Merry <ginijos...@gmail.com> wrote: > > i have wrote a lambda function in go to trigger the event in cognito, i have > attached the lambda in cognito user ppol when i logged in form UI just before > authenticate i am getting error > json: cannot unmarshal string into Go struct field CognitoEvent.version of > type int: UnmarshalTypeError null > > my lambda function is > > func handler(event events.CognitoEvent) (events.CognitoEvent, error) { > > fmt.Printf("Post authenticate event Identity ID : %s\n", event.IdentityID) > }
I don't know how Cognito works, but the error is stating that there is a CognitoEvent.Version field that is defined as an in, and there appears to be some rpc-like mechanism that calls this function using JSON encoding, and the JSON has a string "version" field. > > -- > You received this message because you are subscribed to the Google Groups > "golang-nuts" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to golang-nuts+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.