- Newest
- Most votes
- Most comments
Update: Resolved — the issue was NOT with Cognito's TLD validation.
Following the suggestion to isolate the cause, I ran the recommended tests:
admin-create-user --username test@example.srl→ ✅ Successadmin-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!
Relevant content
- AWS OFFICIALUpdated 7 months ago
- AWS OFFICIALUpdated a year ago
