Sign-up and auth

Amazon Cognito integration

An AWS Lambda function runs as your Cognito user pool’s pre sign-up trigger: just before Cognito creates a user, it checks the address with our API and refuses the sign-up when the result is one you stop. When a check cannot be made, the sign-up goes through.

Read the full setup guideGet an API key

  • Setup guide
  • One CommonJS file and an AWS SAM template

Deployfrom the unpacked download

Terminal
sam deploy --guided --template-file template.json

At a glance.

Status
Setup guide. Not listed on a marketplace yet: you set it up yourself in a few steps, below and in the full guide.
For
Apps that keep their users in an Amazon Cognito user pool and want sign-ups with an undeliverable or throwaway address refused, from self sign-up, administrators and federated first sign-ins.
You need
An AWS account with the user pool, the right to create a Lambda function, an IAM role and a Parameter Store parameter in its Region, and an API key made for it, with a daily credit cap, stored as a SecureString parameter.
Costs
1 credit = 1 validated address, as with any API request. Free: unknown results, API errors, malformed addresses and test addresses on sandbox.email-validation.org.
Full guide
Read the full setup guide

Typical uses.

  • Refuse before the user exists

    Cognito runs the trigger just before it creates the user. A stopped address fails the sign-up with your message, and no user is created.

  • Cover every way in

    Self sign-ups, users an administrator creates and the first sign-in of a Google, SAML or OIDC user are all checked, unless you narrow it.

  • Keep your own trigger

    A pool has one pre sign-up trigger. If yours already has a function, call the check from it instead of deploying a second one.

Set it up. 4 steps.

The short version of the full setup guide, which stays the reference when a step does not match what you see.

Read the full setup guide

  1. Store your key

    In Parameter Store, create the SecureString parameter /email-validation/api-key in the pool’s Region with your API key as its value.

  2. Deploy the function

    Unpack the download from the guide and deploy it with AWS SAM, giving your user pool’s ID. The role it creates may read only that one parameter.

  3. Attach the trigger

    In the Cognito console, open your user pool, then Extensions, Lambda triggers, and add the function as the pre sign-up trigger.

  4. Test it

    Sign up with no_mailbox@sandbox.email-validation.org: it is refused, for free. Do not sign up with a test address that goes through, because Cognito would send its code to a domain that receives no mail.

Good to know.

  • Cognito gives the function 5 seconds; it gives up on our API well before that and lets the sign-up through.

  • No key, a timeout, no credits or any other error lets the sign-up through. The function never resends a check.

  • A user who later changes their email address is not checked, and user import jobs do not reach the trigger.

  • The function logs no address and sends it only to our US host, or with the EU setting to our EU host.

Connect Amazon Cognito.

Test it on our sandbox addresses for free, then on your own contacts.

Create your accountRead the full setup guide

Updated · Maintained by: Email Validation LLC