Skip to content
Cloud Governance Tools

Deny the root user except for S3 bucket policy changes

Deny the root user except for S3 bucket policy changes is an AWS guardrail written in service control policies. Denies every action by the member account root user except s3:GetBucketPolicy, s3:PutBucketPolicy and s3:DeleteBucketPolicy. Copied from a licensed open source set and read on 10 Nov 2026.

More identity and privilege guardrails ยท About Service control policies

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Deny",
      "NotAction": [
        "s3:GetBucketPolicy",
        "s3:PutBucketPolicy",
        "s3:DeleteBucketPolicy"
      ],
      "Resource": "*",
      "Condition": {
        "ArnLike": {
          "aws:PrincipalArn": "arn:aws:iam::*:root"
        }
      }
    }
  ]
}
Blocks
Denies every action by the member account root user except s3:GetBucketPolicy, s3:PutBucketPolicy and s3:DeleteBucketPolicy.
Breaks
Any other task done as the root user in an affected account fails; the README points to the AWS list of tasks that require root user credentials. (source)
Test before applying
As for every Service control policies guardrail: how to test before enforcing
Mechanism
Service control policies (SCPs): IAM users, IAM roles and the root user in member accounts; not the management account and not service-linked roles.
Taken from
open source set, MIT-0 (README states MIT-0; LICENSE file fetched, MIT-0 text, Copyright Amazon.com, Inc.): https://raw.githubusercontent.com/aws-samples/service-control-policy-examples/main/LICENSE

What the policy text names

It names 3 actions or patterns: s3:GetBucketPolicy, s3:PutBucketPolicy, s3:DeleteBucketPolicy. Its conditions test aws:PrincipalArn.

What the source says

s3:PutBucketPolicy (read 10 Nov 2026).

On what it breaks: "Restrict use of root user with exceptions for S3 bucket policy changes, if you are frequently locked out of S3 buckets."

Sources

  1. Deny the root user except for S3 bucket policy changes, read 10 Nov 2026
  2. What it breaks, read 10 Nov 2026
  3. How to test it first, read 10 Nov 2026

Last reviewed 16 Nov 2026.