Interview Prep/AWS/Multi-Account and Landing Zone

How do you design SCPs so they protect without blocking the platform team?

AdvancedProductionMulti-Account and Landing Zone
Answer

Use a deny-list strategy on top of FullAWSAccess and exempt your platform roles with a condition, never by naming individual users:

{
  "Sid": "DenyLeaveOrgAndDisableSecurity",
  "Effect": "Deny",
  "Action": ["organizations:LeaveOrganization", "cloudtrail:StopLogging",
             "cloudtrail:DeleteTrail", "guardduty:DeleteDetector",
             "config:StopConfigurationRecorder"],
  "Resource": "*",
  "Condition": {"ArnNotLike": {"aws:PrincipalArn": "arn:aws:iam::*:role/PlatformAdmin"}}
}

Roll out new SCPs to Sandbox first, then NonProd, then Prod; watch CloudTrail for AccessDenied with an SCP reason. Remember the limits: max 5 SCPs per target and 5,120 characters per policy, so consolidate statements.

aws All AWS questions

More on Multi-Account and Landing Zone