WebページからCognitoにログインすると、アクセストークンバックとIDトークンの両方が取得されます。今私はログイン時にラムダ関数を実行し、ユーザーのデータにアクセスしたいが、ここでは失敗する。 InvalidLambdaResponseException: Invalid lambda trigger source
が得られる。AWS Java Lambda Cognito - 無効なラムダトリガソース
これを引き起こす原因に関するアイデアはありますか?あなたがやろうとしているとエラーに基づいて、あなたが取得しているかの詳細についてはあまり知らない
function loginCognito()
{
AWSCognito.config.region = 'us-east-1';
var authenticationData = {
Username : '***',
Password : '***',
};
var authenticationDetails = new AWSCognito.CognitoIdentityServiceProvider.AuthenticationDetails(authenticationData);
var poolData = { UserPoolId : 'us-east-1*********',
ClientId : '*******************'
};
var userPool = new AWSCognito.CognitoIdentityServiceProvider.CognitoUserPool(poolData);
var userData = {
Username : '***',
Pool : userPool
};
var cognitoUser = new AWSCognito.CognitoIdentityServiceProvider.CognitoUser(userData);
cognitoUser.authenticateUser(authenticationDetails,
{
onSuccess: function (result) {
/* ... */
},
onFailure: function(err) {
alert(err);
}
});
}
をシリアル化することができ、入力オブジェクトを持っている必要がありますか?リクエストID、aws地域、タイムスタンプがありますか? –
@VasileiosLekakisユーザープール/ "my pool"/Triggersでは、 "Post authentication"の下でラムダ機能を選択しました。私はログインするためにjavascriptを使用しています(最新のアップデートを参照) –