Cognito User Pool Triggers Disappear On Release
See original GitHub issueBug Report
Description
Deployment of my Cognito User Pool that is configured in my yml file is making me nervous… It seems randomly after a successful deployment, my User Pool Triggers that are also set/configured in my serverless file will disappear. Then, even if I re-deploy, the triggers do not get reset. It’s not until I make a change to one of my lambda triggers, or another part of my user pool, that the triggers will be re-set. I’m using the PostConfirmation, PostAuthentication, and CustomMessage triggers.
What did you do? I made a change to one of my user pool triggers and then deployed.
What happened? After successfully deploying the serverless, I navigate to the AWS Cognito User Pool dashboard and see that the triggers previously set for the user pool have been removed. Then, I re-deploy and the triggers do not get set. I have to make a change to the trigger configuration, or another part of the user pool to reset the triggers.
-
What should’ve happened? The trigger I modified should have been set, and the other triggers should not have been modified.
-
What’s the content of your
serverless.yml
file?
autoAddUserToDatabase:
handler: handler.autoAddUserToDatabase
events:
- cognitoUserPool:
pool: ${self:custom.usersUserPoolName}
trigger: PostConfirmation
existing: true
customizeCognitoEmails:
handler: handler.customizeCognitoEmails
events:
- cognitoUserPool:
pool: ${self:custom.usersUserPoolName}
trigger: CustomMessage
existing: true
autoAddLoginTimeToUser:
handler: handler.autoAddLoginTimeToUser
events:
- cognitoUserPool:
pool: ${self:custom.usersUserPoolName}
trigger: PostAuthentication
existing: true
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:5 (3 by maintainers)
Does this have any resolution?
Duplicate of #7510