根据要求,我需要打开设备注册Always
.但是,我们的SRP流程开始失败,出现以下问题.
{ code: 'UnknownError', message: 'Unknown error, the response body from fetch is: undefined' }
Run Code Online (Sandbox Code Playgroud)
在做了一些研究之后,我发现了一个类似的帖子,但似乎唯一的解决方案是关闭设备注册.
在运行node get-token.js
脚本以检索我们的CI/CD测试管道的令牌时失败了.
cognitoUser.authenticateUser(authCfg, {
onSuccess: function (result) {
console.log("Result : ", result);
const token = result.getAccessToken().getJwtToken();
resolve(token)
},
onFailure: function(err) {
console.error("Failure : ", err);
console.log(new Error().stack);
reject(new Error("An error occurred: " + err))
},
newPasswordRequired: function (userAttributes, requiredAttributes) {
cognitoUser.completeNewPasswordChallenge(p, userAttributes, this);
},
});
Run Code Online (Sandbox Code Playgroud) 我正在使用 AWS cognito,并且想找出用户上次/上次成功登录移动应用程序的时间。
根据我的理解,AWS cognito 没有内置支持,因此我提供了两个触发器Pre authentication
和Post authentication
,它们是用于将计时存储到 dynamodb 中的 lambda 函数。但是,我想问是否有办法将存储的时间发送到移动应用程序。
我的 java 应用程序在 AWS ECS 容器中运行,8000 作为公开端口
我的 ECS 在私有子网下运行
我想通过会话管理器连接到我的 ECS,如下所示:
aws ssm start-session --target My-ECS-Instance-ID --document-name AWS-StartPortForwardingSession --parameters '{"portNumber":["8000"], "localPortNumber":["8000"]}' --region My-Region
Run Code Online (Sandbox Code Playgroud)
连接似乎建立起来没有任何问题:
Starting session with SessionId: botocore-session-1******-09cf*********8
Port 8000 opened for sessionId botocore-session-1******-09cf*********8.
Run Code Online (Sandbox Code Playgroud)
但不幸的是,当我卷曲这个网址时:
curl -X GET "http://localhost:8000/api/user/9"
Run Code Online (Sandbox Code Playgroud)
它生成以下输出:
卷曲:(52)服务器的空回复