question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cognito User Pool Triggers Disappear On Release

See original GitHub issue

Bug 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.

  1. What should’ve happened? The trigger I modified should have been set, and the other triggers should not have been modified.

  2. 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:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

5reactions
mattnedrichcommented, Mar 2, 2021

Does this have any resolution?

0reactions
medikoocommented, Jun 29, 2020

Duplicate of #7510

Read more comments on GitHub >

github_iconTop Results From Across the Web

Anomalies in Cognito User Pool settings - AWS re:Post
The problem is the reset of the pre sign-up cognito trigger lambda function(Node.js) . The trigger disappears from the selected one and is...
Read more >
Customizing user pool workflows with Lambda triggers
Lambda triggers for federated users​​ You can use the following Lambda triggers to customize your user pool workflows for users who sign in...
Read more >
Cognito Triggers Deep Dive — PreSignUp | Level Up Coding
A deep-dive into the AWS Cognito PreSignUp trigger source with tips, use-cases and examples on how to write a Lambda trigger handler using...
Read more >
AWS Cognito & Amplify Auth - Bad, Bugged, Baffling - Reddit
Cognito automatically updates the email attribute in the user pool, even though it wasn't verified. If the user then logs out, they can...
Read more >
Understanding CloudFormation Updates: Replacement ...
AWS CloudFormation is a powerful tool for provisioning resources in AWS. ... For a Cognito User Pool, all of your registered users are...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found