Amazon Cognito sends verification code automatically if verification feature activated. In my project, sometimes, I will add users(Signup function in AWS Java SDK) and verify them by AdminConfirmSignup myself, so I do not want them to receive verification mail. I will send them customized email manually.(Not using custom lambda in cognito)
If I write pre-signup lambda function and verify the user at that stage, do they still get a verification email?
How can I achieve my goal?
Using pre-signup
Lambda trigger you can auto-confirm the user. In this case they will not get a confirmation email. You can find the pre-signup example with auto confirm in this docs.
Basically, you set the autoConfirmUser
flag to true in the event response.