I am using cognito with facebook login in Unity. I want to use dynamodb with cognito credentials. Unauthenticated credential is good to go but authenticated credential shows an error
DynamoDB GetItem Error : User: arn:aws:sts::XXXXXXXXXXX:assumed-role/"my identity pool"/CognitoIdentityCredentials is not authorized to perform: dynamodb:GetItem on resource: arn:aws:dynamodb:ap-northeast-1:XXXXXXXXXX:table/"table name"
I placed Action "dynamodb:GetItem" in IAM Role, the problem is Condition of IAM Role. If I deleted Condition in IAM Role, it works. But I want to add condition for security. Here is my Condition of IAM Role
"Condition": {
"ForAllValues:StringEquals": {
"dynamodb:LeadingKeys": [
"${cognito-identity.amazonaws.com:sub}"
]
}
}
Please Tell me what to do Thanks..