Cognito Verification Email Not Sent: the 50-a-Day Limit, SES Sandbox, Auto-Verify Settings, Resending Codes and Every Error
When Amazon Cognito does not send the verification email (or the sign-up code, or the password reset code), the cause is almost always one of these: the default Cognito email sender's limit of 50 emails a day per account and Region (it resets at 09:00 UTC and cannot be raised), your own Amazon SES configuration still in the SES sandbox (which only delivers to verified addresses), email not set to be verified automatically in the user pool, a user created with AdminCreateUser (who gets an invitation with a temporary password, not a verification code), a custom message Lambda trigger that fails or drops the {####} code placeholder, the address sitting on a suppression list after a bounce, or the message in spam (it comes from no-reply@verificationemail.com by default). To resend, call resend-confirmation-code for unconfirmed sign-ups; to skip email entirely for a user you trust, an admin can run admin-confirm-sign-up and set email_verified to true. Below: how to find which cause you have, moving to your own SES, every setting involved, resend and admin commands, code expiry, and the error messages that point to each problem.
The shop's new loyalty sign-up worked perfectly in testing. On launch morning, the first fifty customers got their codes and everyone after that got nothing, with no error in the app. Jake checked the user pool, the client, the Lambda trigger. The answer was a quota line he had never read: the built-in sender's fifty emails a day.
New to Cognito or SES? The cards below cover both services, SES verification, and the most common Cognito sign-in error.
Every reason Cognito does not send the email
| Symptom | Cause | Fix |
|---|---|---|
| Worked, then stopped for everyone until the next day | Default sender limit: 50 emails a day per account and Region | Switch the user pool to your own SES |
| Only your own test addresses receive it | Your SES account is still in the sandbox | Request SES production access |
| Nothing sent on sign-up, user stays unconfirmed | Email is not an attribute Cognito verifies automatically | Turn on Cognito-assisted verification for email |
| Admin-created users get a temporary password, not a code | AdminCreateUser sends an invitation by design | Expected; mark email verified when you create them |
| Email arrives without a code, or not at all, after adding a trigger | Custom message trigger fails or drops {####} | Fix the function; keep the placeholder |
| One address never receives anything | It bounced once and is on a suppression list, or a typo | Check the address; with your own SES, remove it from your account suppression list |
| Password reset sends nothing | The user's email is not verified | Verify the email first, or set email_verified as admin |
| Arrives, but late or in junk | Generic sender address and no domain authentication | Your own domain in SES with DKIM and SPF |
Jake: "No error in the app, no error in the logs. Just silence after fifty."
Ethan: "That's the default sender. It's meant for testing, not a launch."
Find your cause in five minutes
Rather than trying fixes one by one, read the facts from your user pool, the user, and SES. These AWS CLI commands are all read-only, so you can run them safely against production:
- How does the pool send email, and what triggers does it have?
aws cognito-idp describe-user-pool --user-pool-id eu-west-2_AbCdEf123 \ --query "UserPool.{Email:EmailConfiguration,AutoVerify:AutoVerifiedAttributes,Triggers:LambdaConfig,Option:VerificationMessageTemplate.DefaultEmailOption}"EmailSendingAccountofCOGNITO_DEFAULTmeans the 50-a-day sender;DEVELOPERmeans your own SES. An emptyAutoVerifymeans Cognito never sends a sign-up code. Any entry underTriggersis a function that can change or block the email. - What state is the user in?
aws cognito-idp admin-get-user --user-pool-id eu-west-2_AbCdEf123 --username customer@example.com
UNCONFIRMEDmeans the sign-up code was never used (resend it);FORCE_CHANGE_PASSWORDmeans an admin-created user waiting on their invitation;CONFIRMEDwithemail_verifiedfalse explains a password reset that sends nothing. - Is your SES account out of the sandbox, and has it sent anything today?
aws sesv2 get-account --region eu-west-2
ProductionAccessEnabledfalse means the sandbox;SendQuota.SentLast24Hoursshows whether Cognito's sends reach SES at all;SendingEnabledfalse means SES has paused your account. - Is this one address suppressed?
aws sesv2 get-suppressed-destination --email-address customer@example.com --region eu-west-2
A result withReason: BOUNCEorCOMPLAINTmeans SES skips that address; "not found" means it is not on your account list. - What does Cognito itself say? If you have turned on delivery error logs (see below), the log group shows the exact failure for each message.
Five answers usually point straight at one row of the table above. Write them down before you change anything; if the first fix does not work, you will know what the starting state was.
The 50-emails-a-day limit, and moving to your own SES
Out of the box, a user pool sends email with Cognito's built-in sender (COGNITO_DEFAULT), from no-reply@verificationemail.com. That sender is limited to 50 emails a day per AWS account in each Region, the limit cannot be increased, and it resets daily at 09:00 UTC. Sign-up codes, password resets and invitations all count. When you hit it, sends fail with a LimitExceededException that says you exceeded the daily email limit and should configure your own Amazon SES.
Switching to your own SES (DEVELOPER mode) removes that cap; your limits become your SES account's limits. The steps:
- Verify a sending identity in SES: your domain (recommended) or one address, in a Region your user pool can use (see the Region note below). Our SES verification guide covers this.
- Request SES production access for that Region; until then SES only sends to verified recipients.
- In the user pool: Authentication methods, Email configuration, Edit, choose Send email from Amazon SES, pick the SES Region and your FROM address, optionally a reply-to and a configuration set.
- Save; Cognito creates a service-linked role to call SES, so the person saving needs
iam:CreateServiceLinkedRole. - Test a sign-up to an address outside your company.
With the CLI, the same change is an EmailConfiguration update:
aws cognito-idp update-user-pool --user-pool-id eu-west-2_AbCdEf123 \ --email-configuration EmailSendingAccount=DEVELOPER,SourceArn=arn:aws:ses:eu-west-2:111122223333:identity/shop.example,From="Shop Example <hello@shop.example>"
Careful: update-user-pool resets settings you leave out to their defaults, so include your existing settings (or make the change in the console). The SES side costs very little at sign-up volumes; our SES explainer covers pricing and reputation.
Using your own SES and still nothing arrives
- Still in the SES sandbox: only verified addresses and domains receive mail. Your colleagues' tests work, real customers get nothing. Request production access.
- The SES identity is in the wrong Region: each user pool Region can use SES identities only in certain Regions (the same Region, and for many older Regions also US East (N. Virginia), US West (Oregon) or Europe (Ireland)). An identity verified elsewhere does not work.
- A custom FROM address with the default sender: if you set your own FROM address while keeping
COGNITO_DEFAULT, the SES identity needs a sending authorization policy that allows Cognito; the console attaches it for you, the CLI does not. - Bounces and complaints: SES can pause sending for an account with a high bounce rate; check the SES reputation dashboard.
- Account-level suppression list: an address that hard-bounced once is skipped; remove it after the user fixes their mailbox.
One nice side effect of your own SES: you can monitor deliveries and bounces, and you control the suppression list. With the default sender, a hard-bounced address can stay suppressed indefinitely, out of your control.
To clear a suppressed address once the customer confirms their mailbox works again:
aws sesv2 delete-suppressed-destination --email-address customer@example.com --region eu-west-2
Keep verification emails out of spam
A code that lands in the junk folder is, for the customer, a code that never came. Most sign-up emails that go missing after you move to SES are sitting in spam, and the fixes are all on your side:
- Send from your own domain, verified in SES as a domain identity, not a free mailbox address. A sign-up email from a gmail.com address sent through SES fails the receiving server's checks.
- Turn on DKIM (Easy DKIM in SES adds three CNAME records to your DNS) so receivers can prove the message came from you.
- Set a custom MAIL FROM domain (for example
mail.shop.example) so SPF aligns with your domain instead of amazonses.com. - Publish a DMARC record, starting with monitoring only:
_dmarc.shop.example TXT "v=DMARC1; p=none; rua=mailto:dmarc@shop.example". Large mailbox providers expect DMARC from domains that send at volume, and it costs nothing to add. - Write like a person: a plain subject with your brand name ("Your Shop Example code"), the code near the top, no link shorteners, and a text version alongside any HTML.
- Keep bounces low: validate the email format in the sign-up form, and offer a "wrong address?" link on the confirmation screen so typos get fixed instead of bouncing again.
After the change, send a test sign-up to accounts at two or three large providers and look at the message headers: you want dkim=pass, spf=pass and dmarc=pass. If any one fails, the DNS record for it is missing or still propagating.
Jake: "SES is live, and now half the codes are in junk."
Ethan: "That's the domain setup, not Cognito. DKIM, MAIL FROM, DMARC, then test again."
What sending through your own SES costs
The cost worry stops some teams moving off the default sender, and it should not. SES outbound email is $0.10 per 1,000 messages on the standard pricing. A shop with 10,000 sign-ups a month sends roughly 13,000 emails once resends and password resets are counted: about $1.30 a month. Even 100,000 sign-ups a month comes to around $13. Cognito does not charge extra for using your own SES; the user pool's own pricing is unchanged. If your account uses one of the newer SES plan bundles, check the effective per-message rate in the SES console, but at sign-up volumes the bill stays small either way.
Compare that with the cost of the default sender's cap: on launch day the shop lost every sign-up after the fiftieth until the next morning. One lost customer is worth more than a year of SES charges. A dedicated IP address is the one SES extra you do not need for sign-up email; the shared pool is fine at these volumes.
The other limits that stop emails
Moving to SES removes Cognito's 50-a-day cap, but a few other limits can still stop codes:
- The SES sandbox quota: until production access is granted, SES sends at most 200 messages in 24 hours, one per second, and only to verified addresses. A pool that "works for the team" and fails for customers is almost always this.
- Your SES production quota: production accounts start with a daily sending quota and a per-second rate that grow with good sending history;
aws sesv2 get-accountshows both. A marketing blast from the same account can use up the quota your sign-up emails need, so keep transactional email on its own account or configuration set. - Cognito API rate limits: sign-up, resend and forgot-password calls have per-account request quotas. A bot hammering your sign-up form can push real users into throttling errors; put AWS WAF in front of your sign-up endpoint or add a CAPTCHA.
- Per-address throttling: repeated requests for the same address in a short time can be throttled, which looks like "resend does nothing". A cool-down on the resend button avoids it.
User pool settings that stop the email being sent at all
If not even one email goes out, check these in the user pool, in this order:
- Cognito-assisted verification: under Sign-up, "Allow Cognito to automatically send messages to verify and confirm" must be on, with email as the attribute to verify. Without it, sign-up creates an unconfirmed user and sends nothing. In the API, this is
AutoVerifiedAttributescontainingemail. - Email is a sign-up attribute: the user must actually provide an email (required attribute, or the username).
- The right flow:
SignUpandResendConfirmationCodesend verification codes;AdminCreateUsersends an invitation with a temporary password instead (and nothing if called withMessageAction=SUPPRESS). - Message templates: a custom verification message must include
{####}for the code (and{##Verify Email##}for link mode). - Triggers: any pre sign-up, custom message or custom email sender function attached to the pool (see triggers).
For admin-created users you trust (staff, migrated accounts), create them with their email already verified, so they never need a code:
aws cognito-idp admin-create-user --user-pool-id eu-west-2_AbCdEf123 --username jake@shop.example \ --user-attributes Name=email,Value=jake@shop.example Name=email_verified,Value=true
Cognito resend verification email (and confirm users manually)
How to make Cognito resend a verification email for a user who never confirmed:
aws cognito-idp resend-confirmation-code --client-id 1example23456789 --username customer@example.com
If your app client has a client secret, add --secret-hash (an HMAC of the username plus client ID, keyed with the secret); without it the call fails. In Amplify, the same action is resendSignUpCode.
When a real person is stuck and you have confirmed their identity another way, an administrator can confirm them and mark the email verified without any code:
aws cognito-idp admin-confirm-sign-up --user-pool-id eu-west-2_AbCdEf123 --username customer@example.com aws cognito-idp admin-update-user-attributes --user-pool-id eu-west-2_AbCdEf123 --username customer@example.com \ --user-attributes Name=email_verified,Value=true
The email_verified attribute matters beyond sign-up: password resets and email-based sign-in rely on it. If it is false, ForgotPassword cannot send a code to that email at all.
Jake: "Thirty customers are stuck from this morning. Resend to all of them?"
Ethan: "Once SES is live, yes. Resending through the default sender just burns tomorrow's fifty."
For a batch like that, list the unconfirmed users and resend to each, slowly, so you stay well inside your SES sending rate:
import time
import boto3
idp = boto3.client("cognito-idp", region_name="eu-west-2")
POOL, CLIENT = "eu-west-2_AbCdEf123", "1example23456789"
pages = idp.get_paginator("list_users").paginate(
UserPoolId=POOL, Filter='cognito:user_status = "UNCONFIRMED"')
for page in pages:
for user in page["Users"]:
idp.resend_confirmation_code(ClientId=CLIENT, Username=user["Username"])
print("resent:", user["Username"])
time.sleep(1)
Add a SecretHash argument if your app client has a secret. Users who signed up long ago and never confirmed may have moved on; consider a time limit on the filter so you only contact recent sign-ups.
The email_verified attribute, explained
email_verified is a true-or-false attribute on every user, and it quietly controls more than sign-up. Cognito sets it to true when the user enters the code from a verification email (or clicks the link), and an administrator can set it directly. While it is false:
- Password resets fail for that address, with "no registered/verified email or phone_number".
- Email sign-in codes and email MFA cannot be sent to it.
- Signing in with the email as an alias may not work, depending on how the pool is set up.
Two details are worth knowing. First, a user can be CONFIRMED (allowed to sign in) while email_verified is still false, for example after admin-confirm-sign-up without the attribute update shown above, so always check both. Second, users who sign in through a social or SAML provider get email_verified from that provider's claims through your attribute mapping; if the mapping is missing, those users show false even when Google or your company directory has verified the address. Map the provider's email-verified claim, or set the attribute in a post-confirmation step, so these users can still reset passwords if they ever add one.
Amplify and front-end: show the right screen
Some "the email never came" reports are really front-end bugs: the app never showed the code screen, or showed it for the wrong user. With Amplify (v6), the sign-up result tells you exactly what to show next:
import { signUp, confirmSignUp, resendSignUpCode, autoSignIn } from "aws-amplify/auth";
const { nextStep } = await signUp({
username: email,
password,
options: { userAttributes: { email }, autoSignIn: true },
});
if (nextStep.signUpStep === "CONFIRM_SIGN_UP") {
// show the code screen, and tell the user where the code went
const where = nextStep.codeDeliveryDetails?.destination; // a masked version of the address
showCodeScreen(where);
}
// on submit of the code screen
await confirmSignUp({ username: email, confirmationCode: code });
await autoSignIn();
// on the "send a new code" button
await resendSignUpCode({ username: email });
Three front-end habits cut support tickets sharply. Show the masked destination ("we sent a code to" plus the masked address Cognito returns), so users spot a typo in their own address. Put a "send a new code" button on the code screen with a short cool-down, so users do not pile up codes and type an old one. And when signUp fails with UsernameExistsException for an unconfirmed user, offer a resend instead of a dead end; that person signed up yesterday and never found the email.
In Amplify v6, auto sign-in after confirmation no longer happens by itself: call autoSignIn() after confirmSignUp, as above, or users land on a sign-in form right after confirming and assume something failed.
Custom message and custom email sender Lambda triggers
Lambda triggers can change or replace Cognito's emails, and they are a common reason codes vanish:
- Custom message trigger: lets you rewrite the subject and body. If the function throws, times out, or returns a message without
{####}, users get no code. Check the function's logs; our Lambda logging guide helps if the logs are empty. - Custom email sender trigger: replaces Cognito's sending completely; the code arrives encrypted with a KMS key, your function decrypts it and sends through your own provider. If decryption or your provider fails, nothing is sent.
- Pre sign-up trigger: can auto-confirm users and set
autoVerifyEmail; if it does, no verification email is sent, by design.
Turn on the user pool's message delivery error logs (log export to CloudWatch Logs) to see failed sends with their reasons instead of guessing.
A custom message trigger that keeps the code
Most broken custom message functions fail in one of four ways, and each one is easy to avoid once you know it:
- The code placeholder is missing. The message must contain the value of
event["request"]["codeParameter"](normally{####}); Cognito swaps in the real code after your function returns. - The pool still uses the default sender. A function that sets
emailMessageoremailSubjectonly works whenEmailSendingAccountisDEVELOPER(your own SES). WithCOGNITO_DEFAULT, Cognito answers with a 400InvalidLambdaResponseExceptionand the user gets nothing. - The email is too long. The limit is 20,000 UTF-8 characters including the code. A longer message is not an error: Cognito silently drops your version and sends its default message, which looks like "my template is ignored".
- A console template wins. Message templates set in the console can override the body your function sets; if your text never appears, check the templates for the same event.
A Python function that handles the common events and keeps the placeholders safe:
SUBJECTS = {
"CustomMessage_SignUp": "Your Shop Example sign-up code",
"CustomMessage_ResendCode": "Your new Shop Example code",
"CustomMessage_ForgotPassword": "Reset your Shop Example password",
"CustomMessage_AdminCreateUser": "Your Shop Example account is ready",
}
def handler(event, context):
source = event["triggerSource"]
if source not in SUBJECTS:
return event # leave other messages as Cognito builds them
code = event["request"]["codeParameter"]
name = event["request"]["userAttributes"].get("given_name", "there")
if source == "CustomMessage_AdminCreateUser":
user = event["request"]["usernameParameter"]
body = f"Hi {name},
Your user name is {user} and your temporary password is {code}."
else:
body = f"Hi {name},
Your code is {code}. It works once, for a limited time."
event["response"]["emailSubject"] = SUBJECTS[source]
event["response"]["emailMessage"] = body
return event
Test it before users do: in the Lambda console, create a test event with triggerSource set to CustomMessage_SignUp and codeParameter set to {####}, and check that the returned message still contains {####}. Keep the function fast and free of network calls where you can; a timeout stops the email just as surely as a crash.
Custom email sender Lambda trigger: send through any provider
The custom email sender trigger goes further: Cognito sends nothing itself and hands every code to your function, encrypted, to deliver however you like (a second SES account, another Region, or a third-party email API). It is powerful and has more moving parts, which is why it is a frequent cause of "no email at all". Setup, in order:
- Create a symmetric KMS key. Cognito encrypts each code with it using the AWS Encryption SDK.
- Allow the key's use: the key policy must let the IAM principal that updates the user pool call
kms:CreateGrant(scoped with thekms:EncryptionContext:userpool-idcondition), and let your function's role callkms:Decrypt. - Write the function with the AWS Encryption SDK to decrypt
event["request"]["code"], then send the message. - Let Cognito invoke it:
aws lambda add-permission --function-name ARN --statement-id CognitoLambdaInvokeAccess --action lambda:InvokeFunction --principal cognito-idp.amazonaws.com. - Attach it with the CLI or SDK (the console cannot set this trigger):
update-user-poolwith--lambda-config "CustomEmailSender={LambdaVersion=V1_0,LambdaArn=ARN},KMSKeyID=KEY_ARN", plus every other trigger and setting you want to keep, because missing values reset to defaults.
A minimal Python version of the function, sending through SES:
import base64, html, os
import boto3
import aws_encryption_sdk
from aws_encryption_sdk.identifiers import CommitmentPolicy
crypto = aws_encryption_sdk.EncryptionSDKClient(
commitment_policy=CommitmentPolicy.REQUIRE_ENCRYPT_ALLOW_DECRYPT)
keys = aws_encryption_sdk.StrictAwsKmsMasterKeyProvider(key_ids=[os.environ["KEY_ARN"]])
ses = boto3.client("sesv2")
def handler(event, context):
secret, _ = crypto.decrypt(source=base64.b64decode(event["request"]["code"]), key_provider=keys)
code = html.unescape(secret.decode("utf-8")) # temporary passwords arrive HTML-escaped
to = event["request"]["userAttributes"]["email"]
if event["triggerSource"] == "CustomEmailSender_AdminCreateUser":
subject, body = "Your Shop Example account", f"Your temporary password is {code}"
else:
subject, body = "Your Shop Example code", f"Your code is {code}"
ses.send_email(FromEmailAddress="Shop Example ",
Destination={"ToAddresses": [to]},
Content={"Simple": {"Subject": {"Data": subject},
"Body": {"Text": {"Data": body}}}})
The event's triggerSource tells you why the message is needed: CustomEmailSender_SignUp, _ResendCode, _ForgotPassword, _UpdateUserAttribute, _VerifyUserAttribute, _AdminCreateUser, _Authentication (sign-in codes) and _AccountTakeOverNotification. Once the trigger is attached, every one of those emails depends on your function, so log each send (without the code) and alarm on the function's errors. When this trigger fails, Cognito has no fallback.
Jake: "Why would anyone choose the harder trigger?"
Ethan: "When the email has to go through a provider the company already pays for, or through SES in a Region Cognito can't use. Otherwise, your own SES with a custom message trigger does the job."
Code or link: why users get a code when you set a link
Cognito can verify sign-ups with a code the user types, or a link they click. The link option only works when the user pool has a domain (a Cognito domain or your custom domain), because the link points there; without one, configure the domain or users keep receiving codes. Only sign-up verification supports links: password resets, invitations and attribute changes always use codes. If you change the message type, make sure your template uses {##Verify Email##} for the link text.
Jake: "Customers keep mistyping the six digits. Can we just send a link?"
Ethan: "For sign-up, yes, once the pool has a domain. Password resets stay as codes either way."
Email sign-in codes and email MFA need your own SES
Newer Cognito features send email too, and they come with a stricter rule. Email one-time passwords for sign-in (passwordless, or as a second factor with email MFA) require two things: the user pool on the Essentials feature plan or higher, and email sent through Amazon SES. With the default Cognito sender, the email MFA option cannot be turned on at all.
If your team turns on email MFA and sign-ins start failing, check in this order:
- Feature plan: Lite pools do not offer email OTP; the plan is shown on the user pool's overview.
- Email configuration:
EmailSendingAccountmust beDEVELOPER, with an SES identity out of the sandbox. - Verified email: a user without a verified email cannot receive a sign-in code, so the same
email_verifiedrule as password resets applies. - Triggers: a custom message function receives these as
CustomMessage_Authentication, and a custom email sender asCustomEmailSender_Authentication; make sure your code handles that source instead of returning nothing for it.
Sign-in codes also change your email volume. Every sign-in sends a message, so a pool with 5,000 daily active users can send more email in a day than its sign-ups do in a month. That is still cheap on SES, but it is exactly the volume the 50-a-day default sender could never carry.
When the code goes by SMS instead
Some pools verify phone numbers, or send codes by SMS when a user has no email. The causes are different, and worth knowing, because "code not received" tickets mix both:
- The SMS sandbox: new accounts start there in each Region; you can only text a handful of verified numbers until you request production access.
- The spend limit: new accounts have a monthly SMS spending quota of $1.00, which runs out after a few dozen messages; request an increase before launch.
- Origination identity: texts to US numbers need a registered origination identity (such as a toll-free number or 10DLC); without one, US users may never receive codes.
- The IAM role: Cognito sends SMS through Amazon SNS with a role you give it; the role needs
sns:Publish.
Email is cheaper and more reliable for most sign-up flows, so if SMS is optional in your app, make email the default and keep SMS for users who ask for it.
Customize the verification email in the console
You do not need a Lambda function to change the wording. In the user pool, open Messaging, then Message templates, and edit the Verification message (sign-up), the Invitation message (admin-created users) and, separately, the MFA and other messages. For each one you choose:
- Code or link for sign-up verification (link needs a domain, as above).
- The subject: make it recognizable ("Your Shop Example code"), because that line decides whether people find it in a crowded inbox.
- The body, which must contain
{####}for a code or{##Verify Email##}for a link; the invitation must also contain{username}and the temporary password placeholder{####}.
HTML is allowed in the body when the pool sends through your own SES, so you can add your logo and colors. Keep it light: a heavy template with large images loads slowly on phones and looks like marketing to spam filters, and the person waiting for a six-digit code wants the code, not a newsletter. A good pattern is one short sentence, the code in large type, and a line saying how long it lasts and what to do if they did not ask for it.
When both a console template and a custom message function exist for the same event, the console template can win. Pick one place for each message so the next person to edit it knows where to look.
When a user changes their email address
Changing an email address sends a code too, and it has its own trap. By default, when a user updates their email, Cognito can switch the attribute to the new address straight away, marked unverified, before the user has proved they own it. If they mistype the new address, they can no longer reset their password, because the new address is unverified and the old one is gone.
The fix is a user pool setting: keep the original value active until the new one is verified. In the console it is under the sign-up and attribute settings ("Keep original attribute value active when an update is pending"); in the API it is UserAttributeUpdateSettings with AttributesRequireVerificationBeforeUpdate set to email:
aws cognito-idp update-user-pool --user-pool-id eu-west-2_AbCdEf123 \ --auto-verified-attributes email \ --user-attribute-update-settings AttributesRequireVerificationBeforeUpdate=email
As with every update-user-pool call, include your other current settings or they reset to defaults. With this on, the user keeps signing in and receiving codes at the old address until they enter the code sent to the new one. The code for the new address comes through CustomMessage_UpdateUserAttribute in a custom message function, so handle that source too if you have one.
Test sign-up email without spamming real inboxes
Testing email flows creates two problems: a pile of fake accounts in your user pool, and bounces from made-up addresses that hurt your SES reputation. Three habits avoid both:
- Use the SES mailbox simulator for automated tests:
success@simulator.amazonses.comaccepts the message,bounce@simulator.amazonses.comsimulates a hard bounce, andcomplaint@simulator.amazonses.coma spam complaint. They exercise your bounce handling without harming your bounce and complaint rates. - Use plus addressing for manual tests:
jake+test1@shop.example,jake+test2@shop.exampleall land in one real mailbox, and each counts as a new user to Cognito. - Keep a separate test user pool with its own settings, and delete test users regularly with
admin-delete-user, so production metrics only count real customers.
For a final check before launch, sign up once with a personal address at each of the big free mail providers and confirm the code arrives in the inbox, not in spam, within a minute.
Jake: "I made forty test accounts with fake addresses last week."
Ethan: "And forty bounces on our SES account. Simulator addresses from now on, and plus addresses when a person needs to read it."
How long codes last
| Message | Sent by | Valid for | Code or link |
|---|---|---|---|
| Sign-up confirmation | SignUp, ResendConfirmationCode | 24 hours | Code or link |
| Password reset | ForgotPassword, AdminResetUserPassword | 1 hour | Code |
| Invitation (temporary password) | AdminCreateUser | Set by the user pool's temporary password validity | Code |
| Email change verification | UpdateUserAttributes, GetUserAttributeVerificationCode | Short-lived; request a new one if it fails | Code |
Two more timing rules explain many support tickets. Each new code replaces the previous one, so users who request several and type an older one get "Invalid verification code provided". And Cognito may throttle repeated sends to the same address in a short time, which looks like "the resend button does nothing"; wait a few minutes before trying again.
See every failed send: delivery error logs
Cognito can export email and SMS delivery errors to a CloudWatch Logs log group. This option is not in the console; you set it with the API or CLI, and it does not need the Plus feature plan:
aws logs create-log-group --log-group-name /aws/vendedlogs/cognito/shop-pool --region eu-west-2
aws cognito-idp set-log-delivery-configuration --user-pool-id eu-west-2_AbCdEf123 \
--log-configurations "LogLevel=ERROR,EventSource=userNotification,CloudWatchLogsConfiguration={LogGroupArn=arn:aws:logs:eu-west-2:111122223333:log-group:/aws/vendedlogs/cognito/shop-pool}"
Each failed message then appears as an ERROR event from USER_NOTIFICATION with a details field explaining what went wrong, such as an SES rejection or an identity Cognito cannot use. The identity running the command needs cognito-idp:SetLogDeliveryConfiguration plus the CloudWatch Logs delivery permissions (logs:CreateLogDelivery, logs:PutResourcePolicy, logs:DescribeLogGroups and related actions). A log group name starting with /aws/vendedlogs avoids a resource policy size limit on accounts with many log deliveries.
Pair it with your SES side: an SES configuration set that publishes bounce, complaint and delivery events to CloudWatch or SNS shows what happened after Cognito handed the message over. Between the two, every "I never got the code" ticket has an answer in under a minute. Delivery of these logs is best effort, so treat a missing entry as "probably sent" rather than proof.
Error messages and what they mean
LimitExceededException: exceeded daily email limit: the 50-a-day default sender limit; configure your own SES.InvalidParameterException: cannot reset password for the user as there is no registered/verified email or phone_number: the email is not verified; verify it or setemail_verifiedas admin.CodeMismatchException: invalid verification code provided: wrong or superseded code; use the newest one.ExpiredCodeException: the code is past its validity; resend.NotAuthorizedException: unable to verify secret hash for client: your client has a secret and the request lacks a correctSECRET_HASH.InvalidEmailRoleAccessPolicyExceptionor SESMessageRejectedin delivery logs: Cognito cannot use your SES identity (Region, sandbox, or sending authorization).InvalidLambdaResponseException: a custom message function returnedemailMessageoremailSubjectwhile the pool uses the default sender, or returned a malformed response; switch the pool to your own SES or fix the response.UserLambdaValidationException: a trigger function threw an error; the message after the colon is your function's own error text.UsernameExistsExceptionon sign-up: the address already has an account, often an unconfirmed one from an earlier attempt; offer a resend.
Our ClientError guide shows how to branch on these codes in Python, and our sign-in error guide covers what happens after confirmation.
Launch-day checklist for Cognito email
The shop now runs through this list before any user pool goes live:
- Own SES, out of the sandbox, with a domain identity in a Region the pool can use.
- DKIM, custom MAIL FROM and DMARC published, and a test message showing pass for all three.
- Email set to auto-verify, and the verification message type (code or link) chosen on purpose.
- Every trigger tested with a sample event for each trigger source it handles, with the code placeholder still in the output.
- Delivery error logs on, plus SES bounce and complaint events going somewhere a person will see them.
- A resend button with a cool-down on the code screen, and the masked destination shown to the user.
- A bulk resend script ready for the first morning, in case anything above was missed.
- Alarms on trigger function errors and on the SES bounce rate.
It takes an afternoon the first time and an hour after that, and it turns a launch-day mystery into a non-event.
Frequently asked questions
Why is Cognito not sending the verification email?
Usually the default sender's 50-emails-a-day limit, an SES account in the sandbox, email not set to auto-verify, or a failing custom message trigger.
What is the Cognito email limit?
With the default Cognito sender, 50 emails a day per account in each Region, not adjustable, resetting at 09:00 UTC.
How do I resend a Cognito verification email?
Call aws cognito-idp resend-confirmation-code with the app client ID and username (plus a secret hash if the client has a secret).
How do I increase the Cognito email limit?
Configure the user pool to send through your own Amazon SES; the limits then follow your SES account.
Why do only some test emails arrive from Cognito?
Your SES account is in the sandbox, which only delivers to verified addresses; request production access.
What address do Cognito emails come from?
no-reply@verificationemail.com by default, or your own verified address with SES.
How do I mark a Cognito user's email as verified?
Run admin-update-user-attributes with Name=email_verified,Value=true, or set it when creating the user.
How do I confirm a Cognito user without a code?
An administrator can run aws cognito-idp admin-confirm-sign-up with the user pool ID and username.
Why does AdminCreateUser not send a verification code?
Admin-created users receive an invitation with a temporary password instead; mark their email verified if you trust it.
Why does Cognito send a code instead of a link?
Link verification needs a user pool domain and the link option for sign-up messages; other messages always use codes.
How long is a Cognito verification code valid?
24 hours for sign-up confirmation, 1 hour for password reset codes.
Why does forgot password not send an email in Cognito?
The user's email is not verified; verify it first or set email_verified as an administrator.
Can a Lambda trigger stop Cognito emails?
Yes. A failing custom message trigger, or one that drops the {####} placeholder, stops the code from being delivered.
Which SES Region can my Cognito user pool use?
The same Region, and for many Regions also US East (N. Virginia), US West (Oregon) or Europe (Ireland); some newer Regions use specific alternates.
Why are Cognito emails going to spam?
The generic default sender and no domain authentication; use your own domain in SES with DKIM and SPF.
What does LimitExceededException mean when signing up?
The daily email limit of the default sender was reached; switch to your own SES configuration.
Can I see why a Cognito email failed?
Turn on the user pool's message delivery error logs to CloudWatch Logs, and check SES sending statistics if you use your own SES.
Does the Cognito email limit apply per user pool?
It applies per AWS account in each Region, across user pools that use the default sender.
Why does my custom message Lambda cause InvalidLambdaResponseException?
The function set emailMessage or emailSubject while the pool uses the default Cognito sender; those fields only work with your own SES.
Why is my Cognito custom email template ignored?
Messages over 20,000 characters are silently replaced by the default, and console message templates can override the body your function sets.
Can I set up the custom email sender trigger in the console?
No. Attach it with update-user-pool or the API, with a symmetric KMS key and permission for Cognito to invoke the function.
How do I resend codes to all unconfirmed Cognito users?
List users with the filter cognito:user_status = "UNCONFIRMED" and call resend-confirmation-code for each, pausing between calls.
Does Cognito email MFA work with the default sender?
No. Email one-time passwords need the Essentials plan or higher and email sent through your own Amazon SES.
How much does it cost to send Cognito emails with SES?
SES charges $0.10 per 1,000 emails at standard pricing, so 10,000 sign-ups a month cost around a dollar or two.
How do I check if my SES account is in the sandbox?
Run aws sesv2 get-account in that Region; ProductionAccessEnabled false means the sandbox.
How do I keep a user's old email until the new one is verified?
Set UserAttributeUpdateSettings with AttributesRequireVerificationBeforeUpdate to email, with email also in the auto-verified attributes.
Can I customize the Cognito verification email without Lambda?
Yes. Edit the verification message template in the user pool's messaging settings; keep {####} for a code or {##Verify Email##} for a link.
How do I test Cognito sign-up emails safely?
Use the SES mailbox simulator addresses for automated tests and plus addressing for manual ones, in a separate test user pool.
How do I stop Cognito emails going to spam?
Send from your own domain with DKIM, a custom MAIL FROM domain and a DMARC record, and keep the message plain and short.
For readers preparing for an AWS certification
We have been covering AWS certifications alongside our fixes, so here is a short extra for readers studying for one. If you only came for the fix, you already have it; feel free to skip this part.
Exams that test this topic: Developer – Associate (DVA-C03 from December 1, 2026) • Solutions Architect – Associate (SAA-C03) • CloudOps Engineer – Associate (SOA-C03).
Here are the exam-style questions this topic tends to raise, with the reasoning you need to answer them:
1. A Cognito user pool stops sending sign-up emails after about 50 per day. What should be changed?
Configure the user pool to send email through the team's own Amazon SES.
2. Amazon SES only delivers to verified addresses. Why?
The account is in the SES sandbox; request production access.
3. Which Cognito user pool feature handles sign-up, sign-in and user directories for an app?
Cognito user pools.
4. How can an administrator confirm a Cognito user without a verification code?
Call AdminConfirmSignUp (and set email_verified to true if needed).
5. Which Cognito Lambda trigger lets you customize verification message text?
The custom message trigger.
6. Which DNS-based email authentication improves SES deliverability?
DKIM (with SPF and DMARC).
Exam codes and dates change often. Our AWS certification changes page keeps track of what is current.
By lunchtime on launch day, the user pool was sending through SES from the shop's own domain with DKIM set up, the stuck customers had fresh codes, and sign-ups ran into the thousands that week without another silent failure. The default sender now only serves the test user pool, where fifty a day is plenty.
Two weeks later the delivery error log caught its first real problem: a customer's company mail server rejecting messages from new senders. Jake saw the entry, the customer added the shop to their safe senders, and the code arrived on the next try. That is the difference the logs make: instead of "the email never came", you get the exact reason within a minute, and a fix you can explain to the person waiting.
📌 If you keep one line from this page
Cognito's built-in sender stops after 50 emails a day per account and Region, so production user pools need your own SES (out of the sandbox, in a supported Region); also check that email is set to auto-verify, and resend with resend-confirmation-code.
Admin-created users get invitations · keep {####} in custom messages · email_verified for password resets.
Revision note. Written October 20, 2026. A silent sign-up is usually a quota you never read.