I have configured a lambda trigger for Cognito. It works well for Cognito user signin but not for federated user sign in. Note: I am not using the 'Cognito Hosted UI' but Auth.federatedSignIn so that the users are authenticated via the provider(eg: google).
Previously i did add-permission for the Cognito. Like below.
aws lambda add-permission
--function-name
--statement-id
--action lambda:InvokeFunction
--principal cognito-idp.amazonaws.com
--source-arn
Should I do the same with 'principal' being google? I tried 'accounts.google.com'. It didn't work.
I am not sure why the trigger doesn't work for federated users.