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 →
- Put all accounts in AWS Organizations with OUs (Security, Infrastructure, Workloads-Prod, Workloads-NonProd, Sandbox).
- 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": "*" }
- Use Control Tower or Account Factory for Terraform for new accounts with baselines.
- 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.
More on Cloud IAM and Compliance
You find an IAM policy with `"Action": "*", "Resource": "*"` attached to an application role. How do you right-size it?BeginnerGuardDuty reports `UnauthorizedAccess:IAMUser/InstanceCredentialExfiltration.OutsideAWS`. What happened and what do you do?AdvancedYour company must pass SOC 2 Type II in six months. What does DevOps own, and how do you automate evidence?IntermediateA partner needs access to one S3 bucket in your account. How do you set up cross-account access safely?IntermediateSomeone logged in with the AWS root user last night. How do you react, and how should you have known?BeginnerHow do you collect logs from 40 accounts so an attacker in one account cannot delete them?Intermediate