问题
I have Amazon Cognito user pool with few users added in it. I have added trigger to invoke my Lambda function after Post confirmation. Do we have any trigger in Cognito to invoke the Lambda function after "User Signout" and "Delete User". I did not see any trigger in Cognito.
How the lambda function can be invoked automatically after User signout and Delete user. Kindly throw some light on this.
回答1:
TL;DR: Can't be done
It can't be done automatically because unlike Sign-in/Sign-ups which create an event, there is no logout event per se. Even the LOGOUT endpoint just clears the existing session. Normally, in such cases we could have done some workaround using Cloudtrail but there is no API for sign out (unless you count GlobalSignOut) and even then Cognito does not log user level APIs.
来源:https://stackoverflow.com/questions/43313165/amazon-cognito-delete-account