I was working Amplify to get Cognito Users.
I was googling and I found one code using this which is recommended by many users.
let users = await cognitoClient.listUsers(request).promise();
Other users all said this works but it does not work on my side.
Instead of it this code works for me.
cognitoClient.listUsers(request, funtion(error, data){
...
})
Please let me know if my node js version have problem