Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Creating unique custom attributes on AWS Cognito

I need to create a custom attribute that is unique for each of the users inside my User Pool. Is there a way for me to do it with a custom attribute using AWS Cognito?

I'm integrating the AWS-SDK in JavaScript.

like image 359
Eduardo Pedroso Avatar asked Oct 19 '25 10:10

Eduardo Pedroso


1 Answers

Such a setting is not possible for custom attributes. The only attributes that work that way are alias attributes (they will need to be unique). These are email, phone_number, and preferred_username. Email and phone_number would need to be verified to be used that way. The only workaround I can think about is using one of the aliases to emulate this behavior.

like image 81
Ionut Trestian Avatar answered Oct 22 '25 00:10

Ionut Trestian



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!