Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AWS Cognito Batch Query

Is it possible to query AWS cognito with a list of user ids? Let's say i have user ids List : userid1,userid2,userid3,userid4,userid5,userid6

I know how to get an users one by one using their id or email address, but I was wondering if it is possible to get the users in a batch query using their ids or emails.

I use golang, but I can use any other language thanks in advance.

like image 985
Francisco Arias Avatar asked Oct 28 '25 13:10

Francisco Arias


1 Answers

You can't do it directly, but maybe you could use https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_ListUsers.html with a filter condition, but it has this limitation:

You can only search for the following standard attributes:

  • username (case-sensitive)

  • email

  • phone_number

  • name

  • given_name

  • family_name

  • preferred_username

  • cognito:user_status (called Status in the Console) (case-insensitive)

  • status (called Enabled in the Console) (case-sensitive)

  • sub

Custom attributes are not searchable.

like image 65
joe Avatar answered Oct 30 '25 15:10

joe