Interview Prep/Monitoring & Observability/Logging: Loki, Fluent Bit and Elasticsearch

Loki compactor logs `failed to upload ... AccessDenied` and retention stops working

IntermediateTroubleshootingLogging: Loki, Fluent Bit and Elasticsearch
Answer

Likely causes → The IAM role (IRSA) lacks s3:DeleteObject/s3:PutObject, or retention isn't enabled on the compactor.

Diagnose → Compactor logs; aws s3 ls s3://loki-chunks/index/ to see if index files update.

Fix → Grant s3:ListBucket, s3:GetObject, s3:PutObject, s3:DeleteObject; set compactor.retention_enabled: true with delete_request_store: s3 and limits_config.retention_period: 744h.

Prevent → Alert on loki_compactor_last_successful_run_timestamp_seconds staleness.

All Monitoring & Observability questions Roadmap: Logging & tracing

More on Logging: Loki, Fluent Bit and Elasticsearch