-
Notifications
You must be signed in to change notification settings - Fork 5.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
User Pool Properties are removed after add trigger to existing a pool #6499
User Pool Properties are removed after add trigger to existing a pool #6499
Comments
Other settings are also affected. I have the following CognitoUserPool definition:
And function defined as:
After adding existing: true in function trigger, the password policy reset to default cognito settings, which requires lowercase, uppercase, symbol, and a number. Strangely, when I change the any of the password policy settings, like changing minimum length to 6, after deploying, it corrects the password policy settings, but this time, PreSignUp trigger is removed in cognito userpool. |
Interesting. Thanks for the in-depth bug report @hiramatsutaku 👍 We've just worked on some CognitoUserPool improvements which will be shipped via 1.50.0. I wonder if those also fix the problems described here. Can someone use the recent One thing to keep in mind is that as soon as you use a CognitoUserPool event you're handing over the trigger management to Serverless, so there's no way to do both: manual Tigger management and Trigger management via Serverless. |
@hiramatsutaku @ahmetcetin after digging deeper I was able to reproduce the problem and fixed it via #6519. This fix seems to work on my end. Could you approve that it also fixes the problem on your end? Thanks! |
@pmuens I checked https://github.com/serverless/serverless/tree/retain-cognito-user-pool-config and it works as expected 🎉 (The log is here. hiramatsutaku/sls-debug-for-trigger-existing-pools#1 (comment)) |
Great! Thanks for testing and confirming @hiramatsutaku 👍 |
Hi @pmuens I'm having a similar issue. Any change to the userpool eg. adding an attribute, removing an attribute, updating the email configuration causes all triggers to be removed after serverless deploy. I'm creating the userpool in cloudformation and I'm on the latest serverless version 1.72.0 |
Hi @pmuens , I am also facing same issue with @jonathan-kosgei . |
I just noticed this as well. Adding an attribute to schema detached the triggers. Odd 😅 I might wire these up to the cognito pool using the function ARNs to work around this |
This is a Bug Report
Description
After add trigger to existing a pool, AutoVerifiedAttributes property of the pool was removed.
I expect not to remove AutoVerifiedAttributes property after add trigger to existing pools.
I've used the serverless.yml below.
The whole is here: https://github.com/hiramatsutaku/sls-debug-for-trigger-existing-pools/blob/master/serverless.yml
sls deploy
I expect to return
not
null
but ↓Diff of User Pool (aws cognito-idp describe-user-pool command output)
Additional Data
The text was updated successfully, but these errors were encountered: