我正在使用Cognito身份池和用户池进行身份验证。步骤如下。
1. Create a Cognito user in Cognito user pool.
2. Assign that user to the Cognito user group which has AWS IAM Role/policy attached.
3. Get the Identity Id by calling GetId and store for future references.
我需要这样做,因为我将用户设置存储在dynamo数据库行中。该行只能由该行的所有者(认知用户)读取。
IAM政策如下限制访问。
"Condition": {
"ForAllValues:StringEquals": {
"dynamodb:LeadingKeys": "${cognito-identity.amazonaws.com:sub}"
}
}
我的问题:如果我将Cognito用户的身份ID存储在我的应用数据库中,它将永远有效(如果未从控制台中手动删除)?