# Restrict access to resources in a suspended OU

Facts read 10 Nov 2026. Page reviewed 16 Nov 2026.

Restrict access to resources in a suspended OU is an AWS guardrail written in resource control policies. Denies a list of actions on resources in the accounts under the OU the policy is attached to, unless the caller is the privileged role or an AWS service principal.

```json
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Deny",
      "Principal": "*",
      "Action": [
        "s3:*",
        "sqs:*",
        "kms:*",
        "secretsmanager:*",
        "sts:AssumeRole",
        "sts:DecodeAuthorizationMessage",
        "sts:GetAccessKeyInfo",
        "sts:GetFederationToken",
        "sts:GetServiceBearerToken",
        "sts:GetSessionToken",
        "sts:SetContext",
        "cognito-identity:*",
        "cognito-idp:*",
        "logs:*",
        "dynamodb:*",
        "ecr:*",
        "aoss:*"
      ],
      "Resource": "*",
      "Condition": {
        "BoolIfExists": {
          "aws:PrincipalIsAWSService": "false"
        },
        "ArnNotLikeIfExists": {
          "aws:PrincipalARN": "arn:aws:iam::${Account}:role/[PRIVILEGED_ROLE]"
        }
      }
    }
  ]
}
```

- **Blocks:** Denies a list of actions on resources in the accounts under the OU the policy is attached to, unless the caller is the privileged role or an AWS service principal.
- **Breaks:** AWS service principals are exempt by default; the README says to remove the aws:PrincipalIsAWSService condition if you also want to restrict security or logging services. ([source](https://raw.githubusercontent.com/aws-samples/resource-control-policy-examples/main/Establish-intra-organization-boundaries/README.md))
- **Test before applying:** As for every Resource control policies guardrail: [how to test before enforcing](/mechanisms/rcp/)
- **Mechanism:** [Resource control policies (RCPs)](/mechanisms/rcp/): Resources of supported services in member accounts, for any principal calling them; not resources in the management account and not service-linked roles.
- **Taken from:** [open source set](https://raw.githubusercontent.com/aws-samples/resource-control-policy-examples/main/Establish-intra-organization-boundaries/Deny-resource-access-if-the-resource-belongs-to-a-specific-organizational-unit.json), MIT-0 (README states MIT-0; LICENSE file fetched, MIT-0 text, Copyright Amazon.com, Inc.): https://raw.githubusercontent.com/aws-samples/resource-control-policy-examples/main/LICENSE

## What the policy text names

It names 17 actions or patterns: `s3:*`, `sqs:*`, `kms:*`, `secretsmanager:*`, `sts:AssumeRole`, `sts:DecodeAuthorizationMessage`, `sts:GetAccessKeyInfo`, `sts:GetFederationToken`, and more. Its conditions test `aws:PrincipalIsAWSService`.

## What the source says

"aws:PrincipalIsAWSService: false" (read 10 Nov 2026).

On what it breaks: "Note: If you would like to restrict AWS services such as security or logging services, you will need to remove the 'aws:PrincipalIsAWSService': 'false' condition."

## Related guardrails

- [Do not allow deletion of resource types](/guardrails/azure-policy-deny-action-delete/): Azure, Azure Policy (built-in definitions), organization integrity
- [Deployment stack deny settings (Azure RBAC deny assignment)](/guardrails/azure-deny-assignment-deployment-stack/): Azure, Azure RBAC deny assignments (created by deployment stacks), organization integrity
- [Resource locks (CanNotDelete and ReadOnly)](/guardrails/azure-lock-cannotdelete-readonly/): Azure, Azure resource locks, organization integrity
- [Deny member accounts leaving the organization](/guardrails/aws-scp-deny-leave-org/): AWS, Service control policies (SCPs), organization integrity
- [Deny billing, tax and account contact changes](/guardrails/aws-scp-deny-billing-and-contact-changes/): AWS, Service control policies (SCPs), organization integrity

## Related pages

- [Block internet gateway ingress for VPCs (declarative policy) (AWS Declarative policies)](/guardrails/aws-declarative-vpc-block-public-access/)
- [Block public sharing of EBS snapshots (declarative policy) (AWS Declarative policies)](/guardrails/aws-declarative-snapshot-block-public-access/)
- [Require IMDSv2 for new EC2 instances (declarative policy) (AWS Declarative policies)](/guardrails/aws-declarative-require-imdsv2/)

## Sources

- Restrict access to resources in a suspended OU: https://raw.githubusercontent.com/aws-samples/resource-control-policy-examples/main/Establish-intra-organization-boundaries/Deny-resource-access-if-the-resource-belongs-to-a-specific-organizational-unit.json (read 10 Nov 2026)
- What it breaks: https://raw.githubusercontent.com/aws-samples/resource-control-policy-examples/main/Establish-intra-organization-boundaries/README.md (read 10 Nov 2026)
- How to test it first: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_rcps_examples.html (read 10 Nov 2026)

Last reviewed 16 Nov 2026. Canonical: https://cloudgovernancetools.com/guardrails/aws-rcp-restrict-suspended-ou-resources/
