Skip to content
Cloud Governance Tools

Deny AWS RAM sharing with external accounts

Deny AWS RAM sharing with external accounts is an AWS guardrail written in service control policies. Denies ram:CreateResourceShare and ram:UpdateResourceShare when the share allows external principals. What it breaks: sharing resources such as VPC subnets with accounts outside the organization fails for every principal in the affected accounts.

More data exfiltration guardrails ยท About Service control policies

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Deny",
      "Action": [
        "ram:CreateResourceShare",
        "ram:UpdateResourceShare"
      ],
      "Resource": "*",
      "Condition": {
        "Bool": {
          "ram:RequestedAllowsExternalPrincipals": "true"
        }
      }
    }
  ]
}
Blocks
Denies ram:CreateResourceShare and ram:UpdateResourceShare when the share allows external principals.
Breaks
Sharing resources such as VPC subnets with accounts outside the organization fails for every principal in the affected accounts. (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 2 actions or patterns: ram:CreateResourceShare, ram:UpdateResourceShare. Its conditions test ram:RequestedAllowsExternalPrincipals.

What the source says

"ram:RequestedAllowsExternalPrincipals: true" (read 10 Nov 2026).

On what it breaks: "Deny users or roles from sharing resources with external account principals."

Sources

  1. Deny AWS RAM sharing with external accounts, 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.