aws-sdk-js-v3 icon indicating copy to clipboard operation
aws-sdk-js-v3 copied to clipboard

AWS Cognito welcome email sometimes not been sent

Open clement-faure opened this issue 2 years ago • 2 comments

Checkboxes for prior research

Describe the bug

I have a AWS Cognito user pool which use AWS SES configuration to send automatic emails.

On my application, when i'm creating a new user, i'm sending custom emails (and AWS Cognito should automatically send welcome email)

I face some issues when importing hundreds of users at the same time, all my custom emails are received (but some of the Cognito welcome email seems to not have been sent).

Did you set up backoff algorithm on AdminCreateUser command to send welcome email ?

SDK version number

"@aws-sdk/client-cognito-identity-provider": "^3.169.0",

Which JavaScript Runtime is this issue in?

Node.js

Details of the browser/Node.js/ReactNative version

v16.17.0

Reproduction Steps

  • Create AWS SES emails
  • Create AWS Cognito User Pool
  • Connect AWS SES Emails with Cognito User Pool
  • Create a custom emails that should be sent when creating user
  • Try to create several hundreds of users at same time

Observed Behavior

Some users will never receive AWS Cognito welcome email

Expected Behavior

All users should receive custom emails and AWS Cognito welcome email

Possible Solution

Backoff algorithm implementation on AdminCreateUser command when sending welcome email

Additional Information/Context

I asked all my users to check on a SPAM folder. I've checked on Cloudwatch if it was delivering issues (but not)

clement-faure avatar Sep 13 '22 09:09 clement-faure

Hi @clement-faure ,

Thank you for opening this issue.

The steps to repro are clear but that are very involved. If you can provided a minimal repo and data to test with, I can try to reproduce.

Also since what you are describing is many consecutive operations of creation of many accounts, perhaps the Cognito server is throttling, users are being created but the email is not sent. My guess is that the issue is with Cognito.

Without seeing your code, or the response logs, I can't say if this might be happening on the SDK client layer, or perhaps it some more convoluted issue with the Cognito server.

Thanks, Ran~

RanVaknin avatar Sep 14 '22 05:09 RanVaknin

Hi @RanVaknin,

Thank you for your message. I've created a minimal repo to reproduce the issue : https://github.com/clement-faure/cognito-email-delivering-issue

You can customize users emails you want to create in cognito pool in src/api/lib/resolvers.

To make the minimal repo working, do not forget to copy .env.template into .env.development.local and fill environment variables.

Do not hesitate to tell me if you need more information.

Thank you in advance. Clément

clement-faure avatar Sep 15 '22 08:09 clement-faure

Greetings! We’re closing this issue because it has been open a long time and hasn’t been updated in a while and may not be getting the attention it deserves. We encourage you to check if this is still an issue in the latest release and if you find that this is still a problem, please feel free to comment or open a new issue.

github-actions[bot] avatar Apr 18 '24 00:04 github-actions[bot]

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread.

github-actions[bot] avatar May 07 '24 00:05 github-actions[bot]