経緯 amazon-cognito-identity-jsを使いブラウザからAmazon Cognitoで認証してDynamoDBにアクセスできるところまでを確認。 その後ログアウトして、別のユーザーでログインしようとしたところ次のエラーが発生した。 Logins don't match. Please include at least one valid login for this identity or identity pool 原因 AWS認証情報取得が成功する時のシーケンスはこんな感じ。ユーザー認証(Login)あたりは簡略化している。 エラーが発生した際はLoginの後にGetIdを行わずにGetCredentialsForIdentityを行って400(Bad Request)が返ってくる。 ではなぜGetIdが省略されてしまったのか? amazon-cognito-ide