Cognito login issue

0

I have created a user pool on cognito but when i call initiate_auth() or or sign_up() function with email of length longer than 128 characters in the "USERNAME" attribute it gives "InvalidParameterException". Is there any way i can change the allowed length for the email to sing_up or log in??

asked a year ago291 views
1 Answer
2
Accepted Answer

Hi, as per https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_AdminCreateUser.html. the AdminCreateUser accepts username only up to 128 chars:

Username
The username for the user. Must be unique within the user pool. Must be a 
UTF-8 string between 1 and 128 characters. After the user is created, 
the username can't be changed.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 128.

AFAIK, you cannot extend it.

Best, Didier

profile pictureAWS
EXPERT
answered a year ago
profile picture
EXPERT
reviewed a year 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.

Guidelines for Answering Questions