Interview Prep/DevSecOps/Incident Response and Governance

Security asks which logs you must keep to investigate an incident months later. What do you set up?

IntermediateScenarioIncident Response and Governance
Answer

Situation read → Many breaches are discovered months after initial access. Short retention means no answers.

What I'd do →

  1. Control plane: CloudTrail (all regions, org trail), Kubernetes API audit logs, IdP sign-in logs, GitHub audit log.
  2. Network: VPC Flow Logs, DNS query logs (Route 53 Resolver), load balancer and WAF logs.
  3. Data access: S3 data events and database audit logs for sensitive stores.
  4. Store in a separate log archive account with Object Lock, 1 year hot and longer in cold storage as required.
  5. Make them searchable (Athena, a SIEM) and test a query quarterly.

Why → Immutable, central logs with long retention are the base of every investigation.

Interview tip → PCI DSS asks for 12 months of audit logs with 3 months immediately available.

All DevSecOps questions

More on Incident Response and Governance