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
| Perimeter | Control objective | Applied on | Policy type | Primary condition keys |
|---|---|---|---|---|
| Identity | Only trusted identities can access my resources | Resources | RCP (or resource policies for unsupported services) | aws:PrincipalOrgID, aws:PrincipalAccount, aws:PrincipalIsAWSService |
| Identity | Only trusted identities are allowed from my network | Networks | VPC endpoint policy | aws:PrincipalOrgID |
| Resource | My identities can access only trusted resources | Identities | SCP | aws:ResourceOrgID |
| Resource | Only trusted resources can be accessed from my network | Networks | VPC endpoint policy | aws:ResourceOrgID |
| Network | My identities can access resources only from expected networks | Identities | SCP | aws:SourceIp, aws:SourceVpc, aws:VpceOrgID, aws:ViaAWSService |
| Network | My resources can only be accessed from expected networks | Resources | RCP | aws: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": "*".NotPrincipalandNotActionare not supported, andActionmust name a service prefix (no bare*). The AWS managedRCPFullAWSAccessis 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
RCPFullAWSAccesscounting 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 denies | Key conditions and exceptions |
|---|---|---|
EnforceOrgIdentities | Access to S3, KMS, SQS, Secrets Manager, Cognito user pools, Logs, DynamoDB, ECR and selected STS actions by principals outside the organisation | StringNotEqualsIfExists 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 |
EnforceTrustedOIDCTenants | sts:AssumeRoleWithWebIdentity from a trusted OIDC provider but the wrong tenant | Provider-specific sub condition, for example a CI/CD organisation |
EnforceTrustedOIDCProviders | sts:AssumeRoleWithWebIdentity from OIDC providers not on your list | Null checks on each trusted provider's sub key |
EnforceConfusedDeputyProtection | AWS service principals acting on your resources on behalf of another organisation | aws: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:ResourceOrgIDis 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:Ownerisamazon) and service-owned S3 buckets for Elastic Beanstalk, Glue, Athena examples and others. AWS's example SCP lists them inNotResource; 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:ResourceOrgIDso 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 byaws:VpceAccount.aws:VpceOrgIDis 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:ViaAWSServiceis true (for example S3 calling KMS) and service principals viaaws:PrincipalIsAWSService. AWS's example also excludes theaws:ec2-infrastructurerole. - 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:Ec2InstanceSourceVpcandaws:Ec2InstanceSourcePrivateIPv4bind 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 on | Effect |
|---|---|---|
dp:include:network | Principals and resources | Opts them in to network perimeter controls |
dp:exclude:network | Principals and resources | Exempts them from the network perimeter |
dp:exclude:identity | Principals and resources | Exempts them from identity perimeter controls |
dp:exclude:resource and dp:exclude:resource:<service> | Principals | Allows access to resources outside the organisation, globally or per service |
dp:exclude | Principals and resources | Exempts 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
- Define the boundary: organisation ID, corporate egress CIDRs, VPCs and endpoints, partner accounts and resources, trusted OIDC providers and tenants.
- 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.
- 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.
- 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
AccessDeniederrors from the policy. - Add VPC endpoint policies replacing the default full-access policy on every endpoint, using service-specific examples where AWS provides them.
- Add the resource perimeter SCP once AWS-owned and partner resources are mapped.
- Add the network perimeter for tagged human roles first, then workloads, with a break-glass principal explicitly exempted for console access when networks fail.
- 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.
- 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:VpceOrgIDoraws:SourceVpc:aws:VpceOrgIDscales across hundreds of VPCs without listing them;aws:SourceVpclists 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
| Signal | Source | Why it matters |
|---|---|---|
AccessDenied attributable to an RCP or SCP | CloudTrail | Rollout impact, and attempted access from outside the perimeter after rollout |
| Changes to RCPs, SCPs and their attachments | CloudTrail for Organizations in the management account | Weakening the perimeter is a defence impairment action |
Changes to dp:* tags on principals or resources | CloudTrail tagging events | Exception abuse |
VPC endpoint policy changes (ModifyVpcEndpoint) | CloudTrail | Reopening the network perimeter |
| External access findings | IAM Access Analyzer | Residual 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:PrincipalIsAWSServicehandling 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:excludeto 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
| Framework | Reference | Data perimeter control |
|---|---|---|
| NIST CSF 2.0 | PR.AA-05, PR.DS-01, PR.IR-01 | Organisation-wide access policy, data at rest protection, protection from unauthorised logical access |
| NIST SP 800-53 Rev. 5 | AC-3, AC-4, AC-6, SC-7 | Enforcement, information flow control (resource perimeter), least privilege, boundary protection (network perimeter) |
| CIS Controls v8.1 | 3 Data Protection, 6 Access Control Management, 12 Network Infrastructure Management | Data access control lists, organisation-only access, endpoint policies |
| ISO/IEC 27001:2022 Annex A | 5.15, 8.3, 8.20, 8.22 | Access control, information access restriction, network security, segregation of networks |
| MITRE ATT&CK v20 | T1530, T1537, T1078.004 | Cloud 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
- AWS: Resource control policies (RCPs)
- AWS: RCP syntax
- AWS: Building a data perimeter on AWS (whitepaper)
- AWS: Data perimeter policy examples (GitHub)
- AWS: Control access to VPC endpoints using endpoint policies
- AWS: IAM global condition context keys
- AWS: Quotas for AWS Organizations
- NIST: SP 800-53 Rev. 5
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