Scalable Logging (Loki with S3)
To handle growing log volumes, the platform’s logging backend (Loki) was migrated from local storage to AWS S3.
⚙️ The Migration
- Backend Change: Updated
loki-config.yamlto utilize the S3 object store. - Connectivity: Configured common storage blocks with AWS access keys and region settings.
🚩 Pitfalls & Solutions
- 301 Permanent Redirect: Encountered a
PermanentRedirecterror when Loki was configured with the wrong AWS region for the bucket. - The Fix: Verified the exact bucket region using header inspection (
x-amz-bucket-region) and updated the config to match (us-east-1).