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

Not all users imported successfully and exception thrown. #46

Open
khteh opened this issue Sep 7, 2022 · 1 comment
Open

Not all users imported successfully and exception thrown. #46

khteh opened this issue Sep 7, 2022 · 1 comment

Comments

@khteh
Copy link

khteh commented Sep 7, 2022

There are 312 users in the exported .json file but only a handful imported successfully with this exception thrown in the console:

$ cbr restore -f 'users.json' -p <profile> --pool <pool> -r <region>
✔ Users imported successfully to <poll>

/usr/local/lib/node_modules/cognito-backup-restore/node_modules/aws-sdk/lib/protocol/json.js:52
  resp.error = util.error(new Error(), error);
                          ^

LimitExceededException: Exceeded daily email limit for the operation or the account. If a higher limit is required, please configure your user pool to use your own Amazon SES configuration for sending email.
    at Request.extractError (/usr/local/lib/node_modules/cognito-backup-restore/node_modules/aws-sdk/lib/protocol/json.js:52:27)
    at Request.callListeners (/usr/local/lib/node_modules/cognito-backup-restore/node_modules/aws-sdk/lib/sequential_executor.js:106:20)
    at Request.emit (/usr/local/lib/node_modules/cognito-backup-restore/node_modules/aws-sdk/lib/sequential_executor.js:78:10)
    at Request.emit (/usr/local/lib/node_modules/cognito-backup-restore/node_modules/aws-sdk/lib/request.js:686:14)
    at Request.transition (/usr/local/lib/node_modules/cognito-backup-restore/node_modules/aws-sdk/lib/request.js:22:10)
    at AcceptorStateMachine.runTo (/usr/local/lib/node_modules/cognito-backup-restore/node_modules/aws-sdk/lib/state_machine.js:14:12)
    at /usr/local/lib/node_modules/cognito-backup-restore/node_modules/aws-sdk/lib/state_machine.js:26:10
    at Request.<anonymous> (/usr/local/lib/node_modules/cognito-backup-restore/node_modules/aws-sdk/lib/request.js:38:9)
    at Request.<anonymous> (/usr/local/lib/node_modules/cognito-backup-restore/node_modules/aws-sdk/lib/request.js:688:12)
    at Request.callListeners (/usr/local/lib/node_modules/cognito-backup-restore/node_modules/aws-sdk/lib/sequential_executor.js:116:18) {
  code: 'LimitExceededException',
  time: 2022-09-07T02:29:15.790Z,
  requestId: '220b9b98-bc64-437b-8ba4-10df913201ac',
  statusCode: 400,
  retryable: false,
  retryDelay: 64.88455069958468
}

Node.js v18.8.0
@ViniciussSantos
Copy link

This is happening because Cognito sends a confirmation email every time a new user is created in an user pool. By default, Cognito uses its own email service, which has a limit of 50 emails per day. You can deactivate the confirmation email and circumvent the limit and be able to import all of your 312 users. But if you want to import all the 312 users and also send confirmation emails to all 312 again, you need to configure SES and link it to Cognito.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants