SEC03-BP04 Share resources securely within your organization
You often need the same resource in several accounts, or you need one account to reach a resource owned by another. Recreating a resource in every account or sharing the resource broadly are both imperfect solutions. Instead, share resources through controlled mechanisms with trusted entities only, and monitor those shares to limit access to what each consumer needs.
Desired outcome:
-
You share resources within your organization through mechanisms scoped to trusted identities, resources, and networks.
-
You monitor shared resources continuously, and unexpected external sharing raises an alert.
-
You maintain a baseline of resources approved for sharing, so deviations are easy to spot.
-
You create foundational resources once and share them, rather than recreating overlapping copies per account.
Common anti-patterns:
-
No process monitors shared resources or alerts on unexpected external sharing.
-
Teams have no baseline for which resources to share and which to keep private.
-
Accounts default to a broadly open policy instead of sharing explicitly when required.
-
Teams recreate the same foundational resource in each account rather than sharing one.
Benefits of establishing this best practice:
-
Sharing through scoped mechanisms reduces the chance of exposing a resource to an untrusted principal.
-
Creating a resource once and sharing it lowers operational overhead and removes errors from duplicate builds.
-
A defined trust boundary supports data loss prevention by limiting where resources can travel.
-
Central management of shared resources shortens time to resolution when a shared component fails.
-
A current view of shares increases confidence when deciding that a resource is no longer needed.
Level of risk exposed if this best practice is not established: Medium
Implementation guidance
Give trusted accounts a controlled path to a specific resource, and restrict access outside of that. To do this, you need a mechanism that shares the resource and a boundary that constrains who the share can reach. Without the boundary, a sharing feature meant for internal use can grant access to any account that knows the resource identifier.
That boundary is a data perimeter: preventive guardrails that verify access only when a trusted identity reaches a trusted resource from an expected network. On AWS, the perimeter typically maps to your organization plus any on-premises networks that access your resources. Condition keys such as aws:PrincipalOrgID on a resource or endpoint policy enforce it, and deny requests from identities outside the organization. Building a perimeter has real cost, so evaluate the control objectives against your risk model before adopting them all. Service control policies do not apply to service-linked roles or AWS service principals, so the perimeter must account for those paths separately.
Resource control policies (RCPs) complete the perimeter from the resource side. SCPs constrain the principals in your accounts, while an RCP sets the maximum access allowed on your resources regardless of which principal makes the request, including AWS service principals and principals outside your organization that SCPs cannot reach. Enforce aws:PrincipalOrgID in an RCP on supported resource types (such as Amazon S3, AWS STS, AWS KMS, Amazon SQS, and AWS Secrets Manager) to deny access from any identity outside your organization and close the service-principal gap that your SCPs have opened.
Prefer purpose-built sharing over general cross-account access.
Many services integrate with
AWS Organizations to share to or manage from a central account,
so
AWS Security Hub CSPM can consolidate findings and
AWS Backup can share backups across accounts. For common
infrastructure such as subnets, Transit Gateway attachments, or
firewalls, AWS Resource Access Manager
For object storage, turn off ACLs on your bucket and define access through policies, which gives you a single control model instead of two overlapping ones. When a content delivery distribution reads from an origin bucket, use origin access control instead of the older origin access identity, because it supports features such as server-side encryption with managed keys. Sharing an encrypted resource often means sharing access to the key as well, which is a separate grant.
Implementation steps
-
Organize accounts with AWS Organizations: Request accounts through your organization's account vending process so they join AWS Organizations and the organizational unit that matches their purpose. Grouping accounts into organizational units lets you attach policies that meet your security and compliance needs at the right scope.
-
Establish a data perimeter: Evaluate the perimeter controls already in place from account provisioning, and adopt the control objectives from Building a data perimeter on AWS that fit your risk posture. Implement the guardrails that verify access comes from a trusted identity, to a trusted resource, over an expected network. Combine SCPs that constrain your principals with RCPs that constrain your resources: attach an RCP that enforces aws:PrincipalOrgID on supported resource types so that no principal outside your organization, including AWS service principals, can reach them. Rather than authoring these policies from scratch, start from the data perimeter policy examples
, which provide reference SCPs, RCPs, and VPC endpoint policies for each perimeter control objective. -
Use built-in resource sharing and restrict it: Where a service supports sharing a resource with another account, such as Amazon Machine Images, constrain the share to trusted accounts. Restrict the ModifyImageAttribute API to specific accounts, and set the ram:RequestedAllowsExternalPrincipals condition to keep AWS RAM sharing inside your organization. See resource sharing and external targets for prescriptive guidance.
-
Share with AWS RAM instead of cross-account access: Use AWS RAM
to create a resource once and share it with roles and accounts, gaining consistency and auditability through logging integrations. If you previously shared a resource through a resource-based policy, promote it with the PromoteResourceShareCreatedFromPolicy API to manage it as a full RAM resource share. -
Share access to encryption keys when sharing encrypted resources: For an encrypted resource such as an Amazon Elastic Block Store (EBS) snapshot, share the AWS KMS key as well, because a consumer cannot use the resource without access to the key that protects it.
Resources
Related best practices:
Related documents:
Related examples: