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 →
- Control plane: CloudTrail (all regions, org trail), Kubernetes API audit logs, IdP sign-in logs, GitHub audit log.
- Network: VPC Flow Logs, DNS query logs (Route 53 Resolver), load balancer and WAF logs.
- Data access: S3 data events and database audit logs for sensitive stores.
- Store in a separate log archive account with Object Lock, 1 year hot and longer in cold storage as required.
- 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.
More on Incident Response and Governance
You find a ransom note in an S3 bucket and most objects have been deleted. What do you do in the first hour?AdvancedYour company has its first real security incident and people are all talking at once in Slack. How do you organise the response?BeginnerAn EC2 instance is confirmed compromised. A colleague wants to terminate it immediately. What do you do instead?IntermediateFalco reports a reverse shell from a pod in EKS. How do you contain it while keeping evidence?AdvancedAfter a security incident, leadership wants to know who to blame. How do you run the post-incident review?BeginnerYou are asked to run a security tabletop exercise for the engineering team. How do you design it?Intermediate