🔷

Service Control Policies (SCP)

  • SCPs are organization-level permission boundaries that define what IAM users and roles can do within accounts.
  • They apply to member accounts only, not the Management Account (which always has full admin access).
  • Evaluation is cumulative and hierarchical: an action must be explicitly allowed at every level from the root to the target account.
  • If any SCP in the path explicitly denies an action, the action is blocked, even if allowed elsewhere.
  • The default policy FullAWSAccess allows all AWS actions unless restricted by another SCP.

SCP Hierarchy – Example

OU (Root)

  • Contains all OUs and accounts.
  • Management Account: unaffected by SCPs.

OU (Sandbox)

  • Policies: FullAWSAccess + Deny S3.
  • Account A: Inherits Full AWS access but is denied S3 (Sandbox OU) and EC2 (account-level Deny).
  • Account B & C: Inherit Full AWS access but are denied S3.

OU (Test)

  • Policies: FullAWSAccess + Deny EC2.
  • Account D: Access to all services except EC2.

OU (Workloads)

  • Policies: FullAWSAccess.

OU (Prod)

  • Policies: Allow EC2.
  • Account E & F: Full AWS access inherited from parent OUs, including EC2.

Notes

  • SCPs only set the maximum available permissions; IAM policies still control actual access.
  • Explicit Deny always takes precedence over any Allow.
  • SCPs are powerful for enforcing security guardrails across an AWS Organization.

SCP Strategies

There are two primary approaches for designing Service Control Policies (SCPs):
  • Blocklist Strategy:
    • Begin with broad permissions (e.g., FullAWSAccess) and add explicit deny statements for specific services, actions, or regions.
    • Best when most services should be available but you need to restrict a small subset.
    • Example: FullAWSAccess + Deny s3:*.
  • Allowlist Strategy:
    • Start with a full deny baseline and explicitly allow only the services and actions you need.
    • More restrictive and suitable for highly controlled environments.
    • Example: Allow only ec2:* and s3:*.
 
Addition:
If a user or role has an IAM permission policy that grants access to an action that is either not allowed or explicitly denied by the applicable service control policy (SCP), the user or role can't perform that action
Service control policy (SCP) affects all users and roles in the member accounts, including root user of the member accounts
Service control policy (SCP) does not affect service-linked role
 
Service-linked role → sono ruoli creati e gestiti automaticamente da specifici servizi AWS (es. AWSServiceRoleForAutoScaling per Auto Scaling, AWSServiceRoleForAmazonGuardDuty per GuardDuty, ecc.) e hanno permessi predefiniti che permettono a quel servizio di operare nel tuo account.