Hello i’m having issue with the loki write pod, i have several hours review all the policies and so, and i had not any luck at all, this is the message coming from loki write pod:
msg="failed to flush" err="failed to flush chunks: store put chunk: AccessDenied: User: arn:aws:sts::0XXXXXXXXX:assumed-role/testing-loki/1740857650077647399 is not authorized to perform: kms:GenerateDataKey on this resource because the resource does not exist in this Region, no resource-based policies allow access, or a resource-based policy explicitly denies access\n\tstatus code: 403
I’m using federated identities to provide access to loki , this is the policy it’s being assume by the federated identity.
{
"Statement": [
{
"Action": [
"s3:PutObject",
"s3:GetObject",
"s3:DeleteObject"
],
"Effect": "Allow",
"Resource": [
"arn:aws:s3:::testing-loki20240727202733654200000001",
"arn:aws:s3:::testing-loki20240727202733654200000001/*"
]
},
{
"Action": "s3:ListBucket",
"Effect": "Allow",
"Resource": [
"arn:aws:s3:::testing-loki20240727202733654200000001",
"arn:aws:s3:::testing-loki20240727202733654200000001/*"
]
},
{
"Action": [
"s3:ListBucket",
"s3:PutObject",
"s3:GetObject",
"s3:DeleteObject"
],
"Effect": "Allow",
"Resource": [
"arn:aws:s3:::testing-loki20240727202733654200000001",
"arn:aws:s3:::testing-loki20240727202733654200000001/*"
]
},
{
"Action": [
"kms:GenerateDataKey",
"kms:Decrypt",
"kms:Encrypt",
"kms:ReEncryptTo",
"kms:GenerateDataKeyWithoutPlaintext",
"kms:DescribeKey",
"kms:GenerateDataKeyPairWithoutPlaintext",
"kms:GenerateDataKeyPair",
"kms:ReEncryptFrom"
],
"Effect": "Allow",
"Resource": "arn:aws:kms:us-east-1:XXXXXXXXXXX:key/XXXXXXXX-8a5c-49ae-b1ef-XXXXXXXX"
}
],
"Version": "2012-10-17"
}
everything is under the same region, so not sure why cannot find it, not sure if is a missing action