We have identity pools which have event triggers configured to trigger lambda upon sync event from mobile users. Now that we are planning on re-creating the infrastructure using terraform so we can automate stuff, we are facing difficulties in setting up the cognito sync trigger.
We have attempted to use the aws_lambda_permission with source_arn pointing to the identity pool but still the trigger is created which shows that part of the configuration is missing (seen in web console). We are not able to identify the terraform configuration from the documentation for aws_cognito_identity_pool resource which can configure the event for identity pool. We are aware that AWS recommends Appsync in place of cognito sync but this was developed long back and we are not in the idea of migrating any sooner.