Detective & preventive security
CloudTrail org trails, AWS Config rules, GuardDuty, Security Hub, KMS key policies. Compliance interviews (banks, DPDP-conscious firms) live here.
The mental model
Think of an office building's security. Preventive controls are the locks: the door simply does not open for a badge that lacks the right permission. Detective controls are the cameras and the motion sensors: they do not stop anyone, but they tell you what happened, when, and to which room. Responsive controls are the guard who gets the alert and walks over.
AWS gives you all three, and the standard mistake is to buy cameras and call it a security programme. Cameras with nobody watching the monitor are an expense, not a control.
Map the services onto that picture:
- Preventive — SCPs, IAM policies, KMS key policies, security groups, S3 Block Public Access. These deny the API call.
- Detective — CloudTrail (what happened), AWS Config (what the resource looks like now, and what it looked like before), GuardDuty (this behaviour is suspicious), Inspector (this software is vulnerable), Macie (this bucket holds personal data), Access Analyzer (this resource is reachable from outside).
- Responsive — Security Hub as the single queue, EventBridge as the wiring, SSM Automation or Lambda as the hands.
Why this exists: in a multi-account estate, security signal is generated in hundreds of places by services that each have their own console, their own finding format and their own regional footprint. Without aggregation you get 300 consoles nobody opens. The entire architecture of AWS security tooling is designed around one idea — collect everywhere, aggregate in one account, act from one queue — and every service in this lesson is a producer or a consumer on that pipeline.
- Deep dive
- Internal architecture
- Real-world use cases
- Best practices
- Common mistakes
- Performance
- Security
- Production troubleshooting
- Advantages & disadvantages
- Alternatives
- Interview expectations
- Interview questions
- Facts to remember
- Cheat sheet
- Quick revision