Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/amazon-web-services/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Amazon web services 获取Cognito用户时放大AWS API函数问题_Amazon Web Services_Amazon Cognito_Aws Amplify - Fatal编程技术网

Amazon web services 获取Cognito用户时放大AWS API函数问题

Amazon web services 获取Cognito用户时放大AWS API函数问题,amazon-web-services,amazon-cognito,aws-amplify,Amazon Web Services,Amazon Cognito,Aws Amplify,我在做Amplify来吸引Cognito用户 我在谷歌上搜索了一下,发现有一个代码使用它,这是许多用户推荐的 let users = await cognitoClient.listUsers(request).promise(); 其他用户都说这是可行的,但对我来说不可行 相反,这段代码适合我 cognitoClient.listUsers(request, funtion(error, data){ ... }) 请告诉我我的node js版本是否有问题async/await在node

我在做Amplify来吸引Cognito用户

我在谷歌上搜索了一下,发现有一个代码使用它,这是许多用户推荐的

let users = await cognitoClient.listUsers(request).promise();
其他用户都说这是可行的,但对我来说不可行

相反,这段代码适合我

cognitoClient.listUsers(request, funtion(error, data){
...
})

请告诉我我的node js版本是否有问题

async/await
在node version 7.6中默认启用。但在以前的版本中,可以使用
--harmony
标志使用它。
await
行是否包含在标有
async
关键字的函数中?如果不指定尝试使用该问题时出现的错误,则很难调试该问题。