Skip to content

Cognito User Pool rejects valid email addresses with .srl TLD (ICANN-registered gTLD)

0

Summary Amazon Cognito User Pool rejects email addresses using the .srl top-level domain with an "Invalid email address format" error during sign-up and user creation. The .srl TLD is a valid generic top-level domain (gTLD) registered with ICANN and actively in use.

Steps to reproduce

  1. Create or use an existing Cognito User Pool configured with email as a sign-in attribute
  2. Attempt to sign up or create a user with an email address ending in .srl (e.g., user@example.srl)
  3. Cognito returns: "Invalid email address format"

Expected behavior Cognito should accept all valid email addresses that comply with RFC 5321/5322, including those with ICANN-registered gTLDs such as .srl.

Actual behavior The email validation logic rejects .srl addresses, preventing users with this TLD from registering.

Environment

  • Region: eu-west-1 (Ireland)
  • Cognito User Pool (standard configuration)
  • Email used as primary sign-in attribute

Impact This is a blocker for our organization, as our corporate email domain uses the .srl TLD (which is the Italian equivalent of "LLC"). We cannot onboard any of our users through Cognito without resorting to workarounds such as using alternative email addresses.

Workarounds attempted

  • Using a Pre-Sign Up Lambda Trigger (partial success, but does not bypass all validation points)
  • Using email as a custom attribute instead of a standard one

Request Please update Cognito's email validation to support all ICANN-registered TLDs, or at minimum provide a configuration option to customize/disable the built-in email format validation.

Thank you.

1 Answer
0
Accepted Answer

Update: Resolved — the issue was NOT with Cognito's TLD validation.

Following the suggestion to isolate the cause, I ran the recommended tests:

  1. admin-create-user --username test@example.srl → ✅ Success
  2. admin-create-user --username riccardogusso@ipsoft.srl → ✅ Success

Both .srl addresses were accepted without any issues. Cognito does support the .srl TLD.

The actual root cause was a PowerShell variable interpolation issue. The original command used PowerShell variables inside the --user-attributes parameter:

$email='user@ipsoft.srl'
aws cognito-idp admin-create-user --user-pool-id $pool --username $email --user-attributes Name=email,Value=$email Name=email_verified,Value=true ...

PowerShell was incorrectly expanding $email within the shorthand --user-attributes syntax, corrupting the email value before it reached the Cognito API. Switching to inline JSON syntax for --user-attributes resolved the problem completely.

Lesson learned: If you get InvalidParameterException: Invalid email address format on Cognito and you're using PowerShell, check how your shell is interpolating variables — especially inside --user-attributes. Use JSON syntax instead of the shorthand Name=key,Value=val format to avoid this issue.

Thanks to everyone who helped troubleshoot this!

answered a month ago

EXPERT

reviewed a month ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.