You need to keep audit logs for 7 years for compliance, but only query them rarely. Design storage.

IntermediateScenarioLogging Pipelines
Answer

Situation read → Long retention, rare access, must be tamper-evident. Hot search clusters are the wrong place.

What I'd do →

  1. Route audit events to a separate stream from application logs.
  2. Write to object storage (S3) with Object Lock in compliance mode and a lifecycle to Glacier Deep Archive after 90 days.
  3. Store in compressed, partitioned format (e.g. s3://audit/year=2026/month=03/) as JSON or Parquet.
  4. Query on demand with Athena or load into a temporary cluster.
  5. Restrict IAM access and log access with CloudTrail data events.

Why → Object storage is cheap and durable; Object Lock gives immutability auditors accept.

Interview tip → Separate "searchable now" from "retained for compliance"; they have different SLAs.

All Monitoring & Observability questions Roadmap: Logging & tracing

More on Logging Pipelines