Your SCP change accidentally locked everyone out of a production OU, including the pipeline. How do you recover?
AdvancedScenarioIAM, Organizations and Multi-Account
Answer
Situation read → SCPs do not apply to the management account, which is the recovery path.
What I'd do →
- Sign in to the management account with an admin who has Organizations permissions
- Detach or fix the SCP:
aws organizations detach-policy --policy-id p-xxxx --target-id ou-abcd-12345678 - Verify member-account calls work again
- Add a post-mortem action to roll out SCPs to a canary OU first with CloudTrail review
Why → Management account is exempt by design, which is also why you must keep workloads out of it.
Interview tip → Always keep FullAWSAccess attached alongside deny lists unless you intentionally use allow-list mode.
More on IAM, Organizations and Multi-Account
A developer needs read-only access to one S3 bucket from their laptop. How do you grant it without creating long-lived access keys?BeginnerAn EC2 application needs to write to DynamoDB. Where do the credentials come from?BeginnerSecurity wants to know who deleted a production S3 bucket yesterday. How do you find out?BeginnerYou must stop anyone in a member account from disabling CloudTrail, even account admins. What do you use?BeginnerA cross-account role assumption fails with AccessDenied even though the target role trusts the source account. What do you check?IntermediateDesign access for a CI pipeline in GitHub Actions to deploy to AWS without storing AWS keys in GitHub.Intermediate