Sub topic 2
Deny List Versus Allow List Strategies
Assume you understand IAM users, roles, identity-based policies, and basic IAM policy JSON. Service control policies (SCPs) and resource control policies (RCPs) do not grant permissions. They set maximum permissions that other policies cannot exceed.
Deny list versus allow list
A deny list starts with broad access and adds explicit Deny statements for actions or conditions that must never be allowed. This is usually easier to operate because new AWS services remain available unless you block them.
An allow list starts with no effective permissions and adds explicit Allow statements for approved actions. Every organization level must allow the request, so this strategy gives tighter control but requires continuous maintenance as services and workloads change.
| Strategy | Strength | Main risk |
|---|---|---|
| Deny list | Easier adoption and fewer interruptions | New services may be available by default |
| Allow list | Strongest restriction | Missing one required allow can break workloads |
Use explicit denies for organization-wide invariants, such as approved Regions or preventing accounts from leaving the organization. Use allow lists for tightly controlled environments where the service inventory is stable.
Writing SCPs for common guardrails
A Region restriction denies requests outside approved Regions. Exempt global services whose requests are not Region-specific.
{
"Version": "2012-10-17",
"Statement": [{
"Sid": "DenyOutsideApprovedRegions",
"Effect": "Deny",
"NotAction": ["iam:*", "organizations:*", "route53:*", "cloudfront:*", "sts:*"],
"Resource": "*",
"Condition": {
"StringNotEquals": {
"aws:RequestedRegion": ["eu-west-1", "eu-central-1"]
}
}
}]
}Other common deny-list SCPs block organizations:LeaveOrganization or specific destructive actions. Attach the policy to the root or an appropriate organizational unit (OU), then verify that inherited exemptions are intentional.
RCPs and request evaluation
An RCP limits permissions on resources in member accounts. An SCP limits permissions available to principals in member accounts. Both are maximum-permission controls, and neither replaces an identity policy or resource-based policy.
For example, an RCP can require TLS for S3 requests:
{
"Version": "2012-10-17",
"Statement": [{
"Sid": "EnforceTLSOnS3",
"Effect": "Deny",
"Principal": "*",
"Action": "s3:*",
"Resource": "*",
"Condition": {"BoolIfExists": {"aws:SecureTransport": "false"}}
}]
}The request must pass every applicable layer:
An explicit deny at any layer ends evaluation. An allow requires the needed permission from IAM policies and compliance with all applicable SCP and RCP controls.
Exercise
Which strategy should protect a production organization from requests outside two approved Regions?
Show answer
Use a deny-list SCP with aws:RequestedRegion and explicit exemptions for global services, then test it on a nonproduction OU.