Service Control Policies (SCPs) in AWS
Centralized permission guardrails for scalable, secure AWS multi-account environments.
In-Depth: What is Service Control Policy (SCP)?
Service Control Policies (SCPs) are a foundational security and governance feature in AWS Organizations, designed to provide centralized control over the maximum available permissions for all accounts within an AWS Organization. Introduced to address the growing complexity and risk associated with managing permissions across multiple AWS accounts, SCPs act as permission guardrails, ensuring that even the most privileged users (including root) in member accounts cannot exceed the boundaries set by the organization’s administrators. This capability is especially critical for enterprises adopting a multi-account strategy, where the need for both autonomy and control must be carefully balanced.
At their core, SCPs are JSON-based policies similar in syntax to AWS Identity and Access Management (IAM) policies, but with a key difference: SCPs do not grant permissions. Instead, they define the maximum permissions that accounts, organizational units (OUs), or the entire organization can have. Any action that is not explicitly allowed by both the SCP and the attached IAM policies is denied. This dual-layered approach enables organizations to enforce least-privilege principles at scale, prevent accidental or malicious escalation of privileges, and codify compliance requirements across all AWS workloads.
The history of SCPs is rooted in AWS’s recognition that cloud adoption at scale often leads to decentralized account management, which, while empowering teams, also increases the risk of security misconfigurations. SCPs were introduced to mitigate these risks by allowing central security teams to define organization-wide controls that cannot be bypassed at the account level. Over time, SCPs have evolved to support the full IAM policy language, including condition keys, resource-level permissions, and advanced constructs like NotAction and Deny statements, making them a powerful tool for implementing sophisticated governance models.
The primary problems SCPs solve are: enforcing compliance and security standards, reducing the blast radius of potential breaches, and enabling safe innovation by allowing account owners to operate freely within established boundaries. With features such as policy inheritance, explicit deny, and integration with AWS CloudTrail for auditing, SCPs are essential for organizations seeking to meet regulatory requirements, manage risk, and maintain operational agility in the cloud.
Architecture
Key Components
Service Control Policy (SCP)
A JSON document that defines the maximum permissions for accounts, OUs, or the entire organization. SCPs do not grant permissions, but set boundaries for what IAM policies can allow.
Organizational Units (OUs)
Logical containers within AWS Organizations used to group accounts. SCPs can be attached to OUs for hierarchical policy management and inheritance.
Policy Inheritance & Evaluation
SCPs are evaluated in conjunction with IAM policies. The effective permissions are the intersection of SCPs and IAM, ensuring no user can exceed the boundaries set by either.
Key Capabilities
Centralized Permission Guardrails
Define and enforce organization-wide boundaries for AWS API actions, ensuring compliance and reducing misconfiguration risk.
Full IAM Policy Language Support
Use conditions, resource-level permissions, NotAction, and explicit Deny statements for granular control and advanced governance.
Hierarchical Policy Inheritance
Attach SCPs at the organization, OU, or account level, leveraging inheritance for scalable, consistent policy enforcement.
Root User Restriction
SCPs apply even to the root user, ensuring that no one can bypass organizational controls.
Common Use Cases
Implementation Example
# Python SDK (boto3) Example: Attach an SCP to an OU
import boto3
client = boto3.client('organizations')
# Example SCP: Deny creation of IAM users
scp_policy = '{\n"Version": "2012-10-17",\n"Statement": [{\n "Effect": "Deny",\n "Action": "iam:CreateUser",\n "Resource": "*"\n}]}'
# Create the SCP
response = client.create_policy(
Content=scp_policy,
Description='Deny creation of IAM users',
Name='DenyIAMUserCreation',
Type='SERVICE_CONTROL_POLICY'
)
policy_id = response['Policy']['PolicySummary']['Id']
# Attach the SCP to an Organizational Unit (OU)
ou_id = 'ou-xxxx-xxxxxxxx' # Replace with your OU ID
client.attach_policy(
PolicyId=policy_id,
TargetId=ou_id
)
This example demonstrates how to create a Service Control Policy that denies the creation of IAM users and attach it to an Organizational Unit using the AWS Python SDK (boto3). Replace ou-xxxx-xxxxxxxx with your actual OU ID.
Related Topics
Test Your Knowledge
Score 8/10 or higher to pass
You need to be logged in to take this quiz.
Login to Continue