Reputation: 40104
I am deploying (using AWS CDK) a Congito event trigger for custom messages. However when invoked it always returns the error: Invalid version. Version should be 1
Searching did not provide an answer:
What I have done after initial error:
The answer on above SO question seems to indicate it should just use latest version.
Any idea what this error means? I don't see anything in the Cognito user pool CDK to add a version number besides me creating an alias and force that version as I did.
Upvotes: 2
Views: 2810
Reputation: 40104
Ah.... I was only returning the emailTemplate and emailSubject. I needed to return the entire original event.
event.response.emailMessage = emailMessage
event.response.emailSubject = emailSubject
return event
Upvotes: 4