How do you design security logging so it is useful and affordable?
IntermediateProductionCompliance as Code, Threat Modeling & Incident Response
Answer
Split logs by value and query frequency:
- Hot tier (SIEM): high-value sources used for detection: IdP sign-ins, CloudTrail management events, Kubernetes audit, GuardDuty and EDR alerts, WAF blocks.
- Warm/cold tier (S3 + Athena, or a security data lake such as Amazon Security Lake in OCSF format): high-volume sources like VPC Flow Logs, DNS logs, S3 data events, queried during investigations.
- Normalise fields (OCSF or ECS) so queries work across sources.
- Set retention per source to meet compliance (often 1 year) and investigation needs.
The SIEM bill usually scales with ingestion, so not everything belongs there.
More on Compliance as Code, Threat Modeling & Incident Response
How do you implement compliance as code across the delivery pipeline?IntermediateHow do you automate audit evidence collection?BeginnerHow do you make threat modelling routine for product teams?IntermediateWhat does "threat model as code" mean, and is it worth it?AdvancedHow do you serve SOC 2, ISO 27001 and PCI DSS with one control set?IntermediateShow a conftest policy that checks a Terraform plan for unencrypted S3 buckets.Advanced