Interview Prep/DevSecOps/Cloud IAM and Compliance

A CloudTrail trail was stopped in one account for six hours. How do you detect this next time in minutes?

BeginnerScenarioCloud IAM and Compliance
Answer

Situation read → Disabling logging is a classic attacker step. It should be both prevented and detected.

What I'd do →

  1. Prevent with an SCP denying cloudtrail:StopLogging, DeleteTrail, UpdateTrail for non-security roles.
  2. Detect with an EventBridge rule on those API calls routing to the on-call channel.
  3. Use an organization trail, which member accounts cannot modify.
  4. GuardDuty also raises Stealth:IAMUser/CloudTrailLoggingDisabled.

Why → Six hours without logs is six hours you cannot investigate.

Interview tip → Pair prevention (SCP) with detection (EventBridge) every time.

All DevSecOps questions Roadmap: Policy as code

More on Cloud IAM and Compliance