Write an SCP that restricts usage to approved regions.
AdvancedConceptCloud Security, CIS and Compliance
Answer
SCPs set the maximum permissions for accounts in an OU; they grant nothing. Global services must be exempted with NotAction or they break.
{
"Version": "2012-10-17",
"Statement": [{
"Sid": "DenyOutsideApprovedRegions",
"Effect": "Deny",
"NotAction": ["iam:*", "organizations:*", "sts:*", "route53:*",
"cloudfront:*", "support:*", "budgets:*"],
"Resource": "*",
"Condition": {
"StringNotEquals": { "aws:RequestedRegion": ["ap-south-1", "eu-west-1"] },
"ArnNotLike": { "aws:PrincipalARN": "arn:aws:iam::*:role/OrgBreakGlass" }
}
}]
}
Other common SCPs: deny leaving the organisation, deny disabling CloudTrail/GuardDuty/Config, deny root user actions, require IMDSv2 on ec2:RunInstances. SCPs do not apply to the management account, so keep workloads out of it.
More on Cloud Security, CIS and Compliance
What is the cloud shared responsibility model?BeginnerWhat is CSPM?BeginnerWhat are CIS Benchmarks, and what is Level 1 vs Level 2?BeginnerHow do you run a CIS assessment of an AWS account with Prowler?IntermediateName the main AWS security services and what each does.BeginnerWhat should you know about CloudTrail configuration?Intermediate