I have connected the Post confirmation
trigger in AWS Cognito to a lambda that adds a row for the user in a hasura tabla via the exposed GraphQL API. I want to do the same for deleting a user but there doesn't appear to be a User deletion
trigger in AWS Cognito. Is there a simple way to hook this event to hasura so it deletes the row in hasura when a user is deleted in cognito.
Asked
Active
Viewed 180 times
1

Benjamin Sommer
- 1,058
- 3
- 15
- 35
1 Answers
3
Perhaps you could reverse the flow here...
How about having your user deletion process begin by deleting the user from the user table and have a hasura event handler for on delete from table that makes the API call to delete the Cognito user...?
Does this work?

Abraham Labkovsky
- 1,771
- 6
- 12
-
Lol. That was fast! – Abraham Labkovsky Oct 25 '20 at 04:07
-
That would work, just not as clean as I was hoping. Thanks for this though, will try that now. – Benjamin Sommer Oct 25 '20 at 04:07