Skip to content
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

cognito-idp update-user-pool overwrites lambda triggers #6698

Closed
drvora opened this issue Feb 5, 2022 · 2 comments
Closed

cognito-idp update-user-pool overwrites lambda triggers #6698

drvora opened this issue Feb 5, 2022 · 2 comments
Assignees
Labels
closed-for-staleness guidance Question that needs advice or information. lambda response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.

Comments

@drvora
Copy link

drvora commented Feb 5, 2022

Hi, we want to enable multiple triggers from Cognito to Lambda aliases. While doing so aws CLI overwrites triggers. We were using aws-cli 2.0.31 but tried with latest version (2.4.16) as well with no luck.

Steps to reproduce -

  1. Adding PostConfirmation trigger via the following command.
    aws cognito-idp update-user-pool --user-pool-id poolid --lambda-config PostConfirmation=arn:aws:lambda:region:accountno:function:CognitoPostConfirmationFunction-dev:live

  2. Verified on AWS Console that pool has Post Confirmation trigger.
    image

  3. Adding PreSignup trigger via the following command.
    aws cognito-idp update-user-pool --user-pool-id poolid --lambda-config PreSignUp=arn:aws:lambda:region:accountno:function:CognitoPreSignupApproveFunction-dev:live

  4. Verified that Post Confirmation is removed and Presignup trigger is shown.
    image

  5. Setup triggers via AWS Console and verified both triggers are active.
    image

We would like to use AWS CLI instead of Console as Console doesn;t allow us to setup trigger to Lambda alias.

@tim-finnigan tim-finnigan self-assigned this Mar 8, 2022
@tim-finnigan tim-finnigan added lambda guidance Question that needs advice or information. labels Mar 8, 2022
@tim-finnigan
Copy link
Contributor

Hi @drvora thanks for reaching out. Have you tried adding both triggers using commas? This approach worked for me:

aws cognito-idp update-user-pool --user-pool-id poolid --lambda-config PostConfirmation=arn:aws:lambda:region:accountno:function:CognitoPostConfirmationFunction-dev:live,PreSignUp=arn:aws:lambda:region:accountno:function:CognitoPreSignupApproveFunction-dev:live

@tim-finnigan tim-finnigan added the response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. label Mar 8, 2022
@github-actions
Copy link

Greetings! It looks like this issue hasn’t been active in longer than five days. We encourage you to check if this is still an issue in the latest release. In the absence of more information, we will be closing this issue soon. If you find that this is still a problem, please feel free to provide a comment or upvote with a reaction on the initial post to prevent automatic closure. If the issue is already closed, please feel free to open a new one.

@github-actions github-actions bot added closing-soon This issue will automatically close in 4 days unless further comments are made. closed-for-staleness and removed closing-soon This issue will automatically close in 4 days unless further comments are made. labels Mar 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-for-staleness guidance Question that needs advice or information. lambda response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.
Projects
None yet
Development

No branches or pull requests

2 participants