A security incident needs logs from 6 months ago that were deleted after 30 days. How do you avoid this next time?

BeginnerScenarioLogging Pipelines
Answer

Situation read → Retention was set by cost, not by investigation or compliance needs.

What I'd do →

  1. Agree retention with security and legal: e.g. 30 days hot, 1 year cold archive for security-relevant logs.
  2. Archive raw logs to S3 with lifecycle rules (Standard → Glacier), alongside hot storage.
  3. Document how to restore or query archives (Athena, rehydrating into a temporary index).
  4. Test the restore process once a quarter.

Why → Archival storage is cheap; missing evidence is expensive.

Interview tip → Retention is a business decision; engineers implement it, not choose it alone.

All Monitoring & Observability questions Roadmap: Logging & tracing

More on Logging Pipelines