Interview Prep/DevSecOps/Cloud IAM and Compliance

Your company has 40 AWS accounts with no central controls. How do you set up preventive guardrails?

IntermediateScenarioCloud IAM and Compliance
Answer

Situation read → Multi-account is good for blast radius but needs org-level controls so no account owner can switch off security.

What I'd do →

  1. Put all accounts in AWS Organizations with OUs (Security, Infrastructure, Workloads-Prod, Workloads-NonProd, Sandbox).
  2. Apply SCPs: deny leaving the org, deny disabling CloudTrail/GuardDuty/Config, deny unapproved regions, deny root user actions.
{ "Effect": "Deny", "Action": ["cloudtrail:StopLogging","cloudtrail:DeleteTrail","guardduty:DeleteDetector"], "Resource": "*" }
  1. Use Control Tower or Account Factory for Terraform for new accounts with baselines.
  2. Test SCPs on the Sandbox OU first.

Why → SCPs apply even to account admins, so guardrails cannot be removed from inside an account.

Interview tip → SCPs never grant permissions; they only set the maximum.

All DevSecOps questions Roadmap: Policy as code

More on Cloud IAM and Compliance