- Newest
- Most votes
- Most comments
Your write-up already makes a clear feature request: it states the gap and explicitly rules out bypassing email verification.
As far as I can tell, the hosted flow can't show delivery-specific messages today. But you can build a workable recovery path around it without replacing the hosted flow.
First, about the case you confirmed
550 5.4.1 Recipient address rejected: Access denied comes from Microsoft 365. It's generated when Exchange Online's directory-based edge blocking rejects a message because the recipient address isn't valid. Despite the "Access denied" wording, it almost always means the address doesn't match a recipient in that Microsoft 365 tenant: a typo, a deleted or unlicensed mailbox, or a sync problem on the recipient's side.
So taking that address off the suppression list will never help. The address itself won't receive mail until the user (or their mail admin) fixes it. The realistic recovery for this user is to sign up with a different address.
Workaround: detect, inform, and let users retry
1. Record delivery outcomes per address. If your user pool sends through your own SES identity, you can attach an SES configuration set to Cognito's email configuration. Send its bounce, complaint, and reject events to EventBridge or SNS, and store the latest status per address (for example in DynamoDB).
Check what SES emits when it skips a message because the address is on your account-level suppression list. In my understanding it reports a permanent bounce with a suppression-list subtype, but test that in your account before relying on it.
2. Automatically release failed signups. When a permanent bounce arrives, have a Lambda look up the user. If their status is UNCONFIRMED, delete them with AdminDeleteUser. That frees the email or username, so the user can go back through the hosted signup with a corrected address, and email ownership is still verified. This requires no change to the hosted pages.
3. Put the guidance where users already go. Since the hosted pages can't explain the failure, add a "Didn't receive your code?" help page. Link it from your app's sign-in entry point and from your support FAQ. The page can tell users that if a code doesn't arrive within a few minutes, they should sign up again with a different address, and give a support contact.
If you add a "check my address" lookup, return only a generic answer such as "we couldn't deliver to this address; please use a different one", and rate-limit it. Otherwise it can be used to find out which addresses have accounts.
4. Optional: control the sending path. The custom email sender Lambda trigger lets you send Cognito's verification emails yourself. Your code can check the SES suppression list before sending (GetSuppressedDestination), record the result, or route the message through a different sender. It won't fix a mailbox that doesn't exist, but it gives you full visibility into what happened to each send.
5. Optional: a second channel. If your product can accept it, letting users verify with a phone number avoids email delivery as a single point of failure.
Steps 1 to 3 together cover most of what you asked for: users get guidance, have a safe path to retry, and see a support link, all while keeping the Cognito-hosted flow.
Sources:
Relevant content
asked a year ago
- AWS OFFICIALUpdated a year ago
