- Newest
- Most votes
- Most comments
It sounds like you're encountering an issue with session policies and the permissions assigned to the role assumed via Cognito. Here are a few steps and considerations to help resolve this issue:
**Ensure Role Trust Relationship: **Ensure that the Cognito Identity Pool role has a trust relationship allowing Cognito to assume the role. The trust relationship policy should look like this:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"Federated": "cognito-identity.amazonaws.com"
},
"Action": "sts:AssumeRoleWithWebIdentity",
"Condition": {
"StringEquals": {
"cognito-identity.amazonaws.com:aud": "us-west-2:xxxxx..."
},
"ForAnyValue:StringLike": {
"cognito-identity.amazonaws.com:amr": "unauthenticated"
}
}
}
]
}
Check KMS Key Permissions: If your SSM Parameter Store is using a KMS key for data encryption, ensure that your Cognito role has the necessary permissions to access the KMS key for decryption. The KMS Key policy should include:
{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "kms:Decrypt", "kms: GenerateDataKey", ], "Resource": "arn:aws:kms:us-west-2:{account-id}:key/{key-id}" } ] }
answered 2 years ago
Relevant content
asked 9 years ago
- AWS OFFICIALUpdated a year ago
