grafana / loki

Like Prometheus, but for logs.
https://grafana.com/loki
GNU Affero General Public License v3.0
23.21k stars 3.36k forks source link

AccessDenied: User: arn:aws:sts::XXXXX:assumed-role/experimental-nodes/i-07c0b8a749aca2fce is not authorized to perform #13206

Open krimeshshah opened 2 months ago

krimeshshah commented 2 months ago

Describe the bug I have deployed loki 3.0 in simple-scalable deployment mode with s3 object storage and tsdb-shipper as index store. All the components write, read and backed with other pods are deployed and running fine. But write components is unable to write the logs coming from promatil to s3 bucket. I have condifured s3 bucket as per the document. Below is the error logs in loki-write pod

level=error ts=2024-06-12T15:29:42.120346177Z caller=flush.go:152 component=ingester org_id=exp msg="failed to flush" err="failed to flush chunks: store put chunk: AccessDenied: User: arn:aws:sts::355291130670:assumed-role/shoot--lp--experimental-nodes/i-07c0b8a749aca2fce 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, request id: 4FYDTGK963QK58Z0, host id: C7BSrGUr9eFPHUvtQD/FdCU+QNMUUmXI9YyiVK0PBi6+eHdD5pHtTRmMVLz0yB/WiY++zQ/AYRB2YbatL0APn6Zk8KCllUtT0ElM5jLDr7o=, num_chunks: 1, labels: {app=\"promtail\", container=\"install-oneagent\", filename=\"/var/log/pods/promtail_promtail-jkxbf_80fc9e90-e689-417e-8c63-52223cba1b08/install-oneagent/0.log\", instance=\"promtail\", job=\"promtail/promtail\", namespace=\"promtail\", node_name=\"ip-10-250-13-185.eu-central-1.compute.internal\", pod=\"promtail-jkxbf\", service_name=\"promtail\", stream=\"stdout\"}"

To Reproduce Steps to reproduce the behavior:

  1. Started Loki (SHA or version) - loki 3.0
  2. Started Promtail (SHA or version) to tail 'promtail 2.9
  3. Query: {} term

Expected behavior loki write should be able to flush and write the logs to s3 bucket

Environment:

Screenshots, Promtail config, or terminal output If applicable, add any output to help explain your problem.

krimeshshah commented 2 months ago

And here is my configuration with loki s3 storage

`sealedSecrets: enabled: true encrypted_s3accessid: encrypted_s3secretkey:

storageRequest: size: 20Gi

loki: loki: persistence: enabled: true size: 10Gi existingClaim: loki-pv-claim extraArgs:

JStickler commented 2 months ago

Questions have a better chance of being answered if you ask them on the community forums.