Join our Newsletter — 33% off our NHI Course
Home› Guides› AWS Resource Control Policies and Data Perimeter Guide:…
Guide Cloud Security

AWS Resource Control Policies and Data Perimeter Guide: Identity, Resource and Network Guardrails

PDF for newsletter subscribers · free to read online

← All guides
By NHI Mgmt Group, edited by Lalit Choda Updated 8 November 2026 14 min read
On this page

In AWS, one permissive bucket policy, one leaked access key or one role trusted by the wrong account is enough to move data out of your organisation, and per-resource policies alone cannot stop that at scale. A data perimeter is a set of organisation-wide preventive guardrails that allow access only when the identity is trusted, the resource is trusted and the network is expected. This guide explains how resource control policies (RCPs), service control policies (SCPs) and VPC endpoint policies combine to enforce those three conditions, which statements to deploy first, how to handle exceptions for AWS services and partners, and how to roll out without breaking production. It goes deeper than the comparison in the AWS Organizations and SCPs Guide and is written for cloud security architects and platform teams running AWS Organizations. Facts were checked against AWS documentation and AWS's published data perimeter policy examples on 27 October 2026.

This is an independent guide from NHI Mgmt Group, based on AWS's public documentation as of November 2026. It is not sponsored or reviewed by AWS. Product features change, so confirm settings against AWS's current documentation.

Key takeaways

  • Three perimeters, six objectives: identity, resource and network perimeters each have a control applied to your identities, your resources and your networks.
  • RCPs protect your resources from outside identities whatever the resource policy says, including member account root users, but only for supported services and never in the management account.
  • SCPs keep your identities on trusted resources and networks, closing exfiltration to attacker-owned buckets and use of stolen credentials from the internet.
  • Exceptions are the design: AWS service principals, AWS-owned resources, partners and break-glass roles must be carved out deliberately, usually with condition keys and protected tags.
  • Roll out bottom-up with evidence: test accounts, then OUs, then the root, using CloudTrail access denied events and IAM Access Analyzer to measure impact.

The data perimeter model

AWS's whitepaper on building a data perimeter sets the goal that access is allowed only when the identity is trusted, the resource is trusted and the network is expected, and is denied if any of the three is false. AWS's policy examples define the terms as follows.

  • Trusted identities: principals (IAM roles or users) in your AWS accounts, or AWS services acting on your behalf.
  • Trusted resources: resources owned by your AWS accounts, or by AWS services acting on your behalf.
  • Expected networks: your on-premises data centres and VPCs, or networks of AWS services acting on your behalf.

Partners can be added to each definition where the business needs it. The organisation (its ID, for example o-exampleorgid) is the usual boundary. For the cross-cloud version of this idea, see the Cloud Data Perimeter Guide.

The six control objectives

PerimeterControl objectiveApplied onPolicy typePrimary condition keys
IdentityOnly trusted identities can access my resourcesResourcesRCP (or resource policies for unsupported services)aws:PrincipalOrgID, aws:PrincipalAccount, aws:PrincipalIsAWSService
IdentityOnly trusted identities are allowed from my networkNetworksVPC endpoint policyaws:PrincipalOrgID
ResourceMy identities can access only trusted resourcesIdentitiesSCPaws:ResourceOrgID
ResourceOnly trusted resources can be accessed from my networkNetworksVPC endpoint policyaws:ResourceOrgID
NetworkMy identities can access resources only from expected networksIdentitiesSCPaws:SourceIp, aws:SourceVpc, aws:VpceOrgID, aws:ViaAWSService
NetworkMy resources can only be accessed from expected networksResourcesRCPaws:SourceIp, aws:VpceOrgID, aws:VpceAccount

Each objective addresses a different risk. The identity perimeter reduces unauthorised access by identities outside your organisation. The resource perimeter reduces unintended data movement to resources outside it. The network perimeter reduces the use of credentials outside your corporate environment, which is the scenario behind most leaked-key incidents.

How resource control policies work

RCPs are an AWS Organizations policy type that set the maximum permissions available on resources in member accounts. They are evaluated alongside SCPs, identity policies and resource policies, and effective permissions are the intersection. Five properties shape how you use them.

  • They apply in the resource owner's account: an RCP on account A's bucket applies to anyone accessing it, including principals outside the organisation and account A's root user. An RCP in account B does nothing for account B's users reaching account A.
  • They only deny: customer RCPs must use "Effect": "Deny" and "Principal": "*". NotPrincipal and NotAction are not supported, and Action must name a service prefix (no bare *). The AWS managed RCPFullAWSAccess is attached automatically everywhere when RCPs are enabled and cannot be detached.
  • They cover supported services only: the list includes Amazon S3, AWS STS, AWS KMS, Secrets Manager, Amazon SQS, DynamoDB, Amazon ECR, CloudWatch Logs and Amazon Cognito, among others. For other services, use resource-based policies.
  • They have blind spots: no effect on resources in the management account, on service-linked roles, on AWS managed KMS keys or on kms:RetireGrant.
  • They are small: 5,120 characters per policy and five RCPs per root, OU or account, with RCPFullAWSAccess counting as one of the five. SCPs allow 10,240 characters and ten per target. Whitespace counts when policies are saved through the CLI or SDKs.

The RCP that covers STS is particularly useful for non-human identity: denying sts:AssumeRole to principals outside the organisation applies to every role trust policy in the member accounts at once, so a trust policy that mistakenly trusts an external account cannot be used unless that account is on the exception list. See the AWS STS and AssumeRole Guide.

Building the identity perimeter

AWS's example identity perimeter RCP contains four kinds of statement. They are worth understanding individually because each needs its own exceptions.

Statement (AWS example Sid)What it deniesKey conditions and exceptions
EnforceOrgIdentitiesAccess to S3, KMS, SQS, Secrets Manager, Cognito user pools, Logs, DynamoDB, ECR and selected STS actions by principals outside the organisationStringNotEqualsIfExists on aws:PrincipalOrgID; allow-listed aws:PrincipalAccount values for partners and AWS service accounts such as the Elastic Load Balancing log delivery account; resource tag exception; BoolIfExists aws:PrincipalIsAWSService false so service principals are handled separately
EnforceTrustedOIDCTenantssts:AssumeRoleWithWebIdentity from a trusted OIDC provider but the wrong tenantProvider-specific sub condition, for example a CI/CD organisation
EnforceTrustedOIDCProviderssts:AssumeRoleWithWebIdentity from OIDC providers not on your listNull checks on each trusted provider's sub key
EnforceConfusedDeputyProtectionAWS service principals acting on your resources on behalf of another organisationaws:SourceOrgID or allow-listed aws:SourceAccount; applied only when aws:PrincipalIsAWSService is true and aws:SourceAccount is present

The OIDC statements are an organisation-wide backstop for the role trust policy settings described in the Workload Identity Federation Guide: even if a team writes a trust policy with a wildcard subject, the RCP denies tokens from tenants you do not own. The confused deputy statement does the same for service principals such as CloudTrail or Config writing into your buckets, using the aws:Source* keys AWS recommends for any service principal grant.

The network-side identity control is the VPC endpoint policy. The default endpoint policy allows everything, so replace it with one that only permits principals in your organisation (aws:PrincipalOrgID) to use the endpoint. On gateway endpoints for S3 and DynamoDB, Principal must be * and restrictions go in conditions. Endpoint policies are limited to 20,480 characters, one per endpoint, and not every service supports them.

Building the resource perimeter

The resource perimeter stops your own principals, including a compromised role, from writing data to resources outside the organisation. It is applied as an SCP because it constrains your identities.

  • Core statement: deny all actions where aws:ResourceOrgID is not your organisation ID.
  • AWS-owned resources: many workflows read resources AWS owns, such as AWS managed policies (arn:aws:iam::aws:policy/*), public Systems Manager documents and parameters, Amazon-owned AMIs (ec2:Owner is amazon) and service-owned S3 buckets for Elastic Beanstalk, Glue, Athena examples and others. AWS's example SCP lists them in NotResource; review the list for the services you use.
  • Partner resources: allow-list specific third-party resource ARNs where integrations need them, not whole accounts.
  • Network side: the VPC endpoint policy adds aws:ResourceOrgID so the endpoint only reaches organisation resources.

This is the control that blocks a common exfiltration pattern: a stolen role session copying objects into a bucket the attacker owns (T1537 Transfer Data to Cloud Account).

Building the network perimeter

The network perimeter makes a credential useless outside your expected networks. It is the most valuable perimeter against leaked keys and stolen sessions, and the hardest to roll out.

  • On resources (RCP): deny access to supported services unless the request comes from your corporate CIDR (aws:SourceIp) or through a VPC endpoint owned by your organisation (aws:VpceOrgID), with partner endpoints allow-listed by aws:VpceAccount. aws:VpceOrgID is only present when the request travels through a VPC endpoint whose owner account is in an organisation.
  • On identities (SCP): the same logic applied to your principals, so their credentials do not work from the internet.
  • AWS services acting for you: exempt calls where aws:ViaAWSService is true (for example S3 calling KMS) and service principals via aws:PrincipalIsAWSService. AWS's example also excludes the aws:ec2-infrastructure role.
  • Scope by tag: AWS's examples apply network controls only to principals tagged dp:include:network = true, so you can start with human console roles and add workloads gradually.
  • Instance credentials: for EC2 roles, the keys aws:Ec2InstanceSourceVpc and aws:Ec2InstanceSourcePrivateIPv4 bind credentials to the VPC they were delivered to. See the EC2 Instance Metadata Service Hardening Guide.

Exceptions and the tags that control them

Tag (AWS example convention)Placed onEffect
dp:include:networkPrincipals and resourcesOpts them in to network perimeter controls
dp:exclude:networkPrincipals and resourcesExempts them from the network perimeter
dp:exclude:identityPrincipals and resourcesExempts them from identity perimeter controls
dp:exclude:resource and dp:exclude:resource:<service>PrincipalsAllows access to resources outside the organisation, globally or per service
dp:excludePrincipals and resourcesExempts from all perimeters

Because these tags grant exceptions, they are authorisation data. AWS's examples include governance SCP and RCP statements that stop anyone except designated principals from setting or removing them, including as session tags. Without that protection, anyone who can tag a role can exempt it. If you use AWS Control Tower, also exclude AWSControlTowerExecution and the other roles it uses to manage accounts.

Rolling out a data perimeter

  1. Define the boundary: organisation ID, corporate egress CIDRs, VPCs and endpoints, partner accounts and resources, trusted OIDC providers and tenants.
  2. Analyse current access: use IAM Access Analyzer external access findings to see what is shared outside the organisation, and CloudTrail to find calls by external principals, to external resources and from outside expected networks. See the IAM Access Analyzer Guide.
  3. Start with the identity perimeter RCP on S3, KMS, Secrets Manager and STS. It has the fewest dependencies and protects against misconfigured resource policies immediately.
  4. Test bottom-up: attach to a test account, then a pilot OU, then up the hierarchy. AWS strongly recommends not attaching RCPs to the root without thorough testing. Watch CloudTrail for AccessDenied errors from the policy.
  5. Add VPC endpoint policies replacing the default full-access policy on every endpoint, using service-specific examples where AWS provides them.
  6. Add the resource perimeter SCP once AWS-owned and partner resources are mapped.
  7. Add the network perimeter for tagged human roles first, then workloads, with a break-glass principal explicitly exempted for console access when networks fail.
  8. Protect the perimeter: deploy the governance statements for tags, manage all policies as code with review, and keep within the 5,120 character RCP limit by grouping actions.
  9. Rollback: detaching an RCP or SCP restores prior behaviour immediately, so keep the previous version in source control and detach from the affected OU if production breaks.

Decision guidance

  • RCP or resource policy: use an RCP for supported services because it cannot be overridden by account administrators; use resource policies for unsupported services and for resource-specific rules.
  • SCP or permissions boundary: use SCPs for perimeter rules that apply to everyone; boundaries are for delegated role creation.
  • aws:VpceOrgID or aws:SourceVpc: aws:VpceOrgID scales across hundreds of VPCs without listing them; aws:SourceVpc lists explicit VPCs for tighter, smaller estates.
  • Small versus large organisations: under a few dozen accounts, the identity perimeter RCP and endpoint policies give most of the value. Large organisations with many partners and data platforms should invest in tagging governance and staged rollout of all six objectives.

Detection and measurement

SignalSourceWhy it matters
AccessDenied attributable to an RCP or SCPCloudTrailRollout impact, and attempted access from outside the perimeter after rollout
Changes to RCPs, SCPs and their attachmentsCloudTrail for Organizations in the management accountWeakening the perimeter is a defence impairment action
Changes to dp:* tags on principals or resourcesCloudTrail tagging eventsException abuse
VPC endpoint policy changes (ModifyVpcEndpoint)CloudTrailReopening the network perimeter
External access findingsIAM Access AnalyzerResidual sharing outside the organisation

Map detections to ATT&CK T1530 Data from Cloud Storage, T1537 Transfer Data to Cloud Account and T1078.004 Valid Accounts: Cloud Accounts. Useful metrics:

  • Coverage: share of member accounts with the identity perimeter RCP attached; target 100 percent.
  • Endpoint coverage: VPC endpoints still on the default full-access policy; target zero.
  • Exception count: principals and resources carrying dp:exclude* tags, each with an owner and expiry.
  • External access findings open for more than 30 days.
  • Network perimeter adoption: share of human and workload roles tagged dp:include:network.

Common failure patterns

  • Forgetting AWS service principals: an identity perimeter without the aws:PrincipalIsAWSService handling breaks CloudTrail, Config and log delivery into buckets.
  • Assuming the management account is covered: RCPs and SCPs do not protect it, so keep data and workloads out of it.
  • Unprotected exception tags: a developer adds dp:exclude to their own role and the perimeter no longer applies.
  • Default endpoint policies left in place: any principal can use your endpoints to reach any account's resources, which turns your network into an exfiltration path.
  • Attaching straight to the root: a missing exception for a partner or AWS service account causes an organisation-wide outage, and the policy is detached and never reattached.
  • Relying on the perimeter alone: it constrains who, what and where, not how much. A trusted identity on an expected network can still misuse its permissions, so least privilege and logging remain necessary.

Lessons from incidents

A recurring cloud attack pattern uses stolen AWS keys with S3 read and write permissions to re-encrypt objects with SSE-C using keys only the attacker holds. Denying SSE-C through policy conditions counters it, and an RCP is a way to apply such a deny to every bucket in every member account at once. A network perimeter adds a second barrier: long-term keys used from outside your CIDRs and endpoints are refused regardless of their permissions. The same applies to instance credentials taken through SSRF and then used to sync S3 data.

Framework mapping

FrameworkReferenceData perimeter control
NIST CSF 2.0PR.AA-05, PR.DS-01, PR.IR-01Organisation-wide access policy, data at rest protection, protection from unauthorised logical access
NIST SP 800-53 Rev. 5AC-3, AC-4, AC-6, SC-7Enforcement, information flow control (resource perimeter), least privilege, boundary protection (network perimeter)
CIS Controls v8.13 Data Protection, 6 Access Control Management, 12 Network Infrastructure ManagementData access control lists, organisation-only access, endpoint policies
ISO/IEC 27001:2022 Annex A5.15, 8.3, 8.20, 8.22Access control, information access restriction, network security, segregation of networks
MITRE ATT&CK v20T1530, T1537, T1078.004Cloud storage collection, exfiltration to other accounts, stolen credentials

Practitioner checklist

  • Write down your organisation ID, corporate CIDRs, trusted VPCs and endpoints, partners and OIDC tenants.
  • Run IAM Access Analyzer external access analysis and resolve or document every finding.
  • Deploy the identity perimeter RCP to a test account, then OUs, then the root.
  • Include confused deputy and OIDC tenant statements in the RCP.
  • Replace default VPC endpoint policies with organisation-scoped ones.
  • Deploy the resource perimeter SCP with reviewed AWS-owned resource exceptions.
  • Start the network perimeter with tagged human roles and an exempt break-glass principal.
  • Protect dp:* tags with governance SCP and RCP statements.
  • Alert on perimeter policy, attachment, tag and endpoint policy changes.
  • Keep data and workloads out of the management account.

Standards and references

Related NHI Mgmt Group resources: AWS Organizations and SCPs Guide · Cloud Data Perimeter Guide · AWS STS and AssumeRole Guide · IAM Access Analyzer Guide · AWS Security Guide

PDF for subscribers

Take this guide with you

Every section, table and checklist in one PDF, with links to the sources and related guides. Subscribe to our weekly NHI & AI Identity Journal and we’ll email you a download link.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

NHIMG Editorial Note
Researched and written by the NHI Mgmt Group editorial team using AI tools, under the editorial direction of Lalit Choda. Facts are drawn from the sources listed on this page and checked by our automated quality process. Last updated 8 November 2026. Spotted an error? Use our contact page.
NHI Mgmt Group, the independent authority on Non-Human Identity, IAM and Agentic AI security. nhimg.org

PDF Downloads for Newsletter Subscribers

Get the guide

Enter your details and we’ll email you a download link.

The full guide is free to read online. The PDF is a thank you for subscribing.

Fill in all fields marked * and tick the PDF box to continue.