I am facing a strange problem in saving the triggers in cognito pool
I have an angular UI that authenticates using cognito pool, and the pool calls a lambda configured under PRE Token generator. I am creating the pool using AWS CLI. Below the command used.
aws cognito-idp create-user-pool --pool-name "${CLIENT}-app" --admin-create-user-config AllowAdminCreateUserOnly=true --policies "$PASSWORD_POLICY" --email-verification-subject "$EMAIL_VERIFICATION_SUBJECT" --auto-verified-attributes email --lambda-config PreTokenGeneration="$PRE_TOKEN_LAMBDA_REF" --schema "$CUSOM_ATTR_VALUES"
I see the trigger is created properly. I verified in aws console (UI) and I queried the pool using aws list-pools, Both cases the lambda is referenced properly in Pre token generator.
But using the Angular UI while accessing the pool , i am getting Access Denied exception. I am able to resolve the problem by manually visiting the pool and simply press "Save Changes" under Triggers. I am not updating any information in the pool. After this step the UI is able to work without any issues.
Kindly provide your suggestions.
Regards Viji