3.3.1.11. Cross-Account Resource Sharing (AWS RAM, Transit Gateway, VPC Sharing)
3.3.1.11. Cross-Account Resource Sharing (AWS RAM, Transit Gateway, VPC Sharing)
💡 First Principle: Own a shared resource once in a central account and grant other accounts the right to use it, instead of copying it into every account or opening broad cross-account roles.
AWS Resource Access Manager (RAM):
- Shares resources that have no resource-based policy of their own: Transit Gateways, VPC subnets, customer managed prefix lists, Route 53 Resolver rules, IPAM pools, AWS Private CAs, VPC Lattice service networks, Aurora DB clusters (for cloning), EC2 Capacity Reservations, License Manager configurations and others. Services with resource policies (S3, KMS, SQS) share through those policies instead.
- Sharing with AWS Organizations (enabled once from the management account): share with the whole organization or an OU, and accounts get access without invitations. Accounts that later join the OU gain access automatically, and accounts that leave lose it. Sharing with an account outside the organization sends an invitation it must accept. Some types, such as subnets, can be shared only inside the organization, and you can set a share to "allow sharing only within your organization".
- Managed permissions define what consumers may do with each resource type (AWS managed, or a customer managed permission that narrows it). Consumers still need IAM identity policies on the shared resource's ARN.
- RAM is Regional: a share exists in the Region of its resources.
Transit Gateway sharing pattern: the network account owns the Transit Gateway and shares it through RAM. Each member account creates a VPC attachment, which stays pending acceptance until the owner accepts it, unless the gateway has auto accept shared attachments turned on. Route tables, associations and propagations stay with the owner, which is how the network team keeps segmentation (prod, non-prod, inspection) under its control.
VPC sharing: the owner shares subnets of one VPC with participant accounts. Participants launch their own instances, databases and load balancers into those subnets and manage their own security groups, while the owner alone controls the VPC, subnets, route tables, NACLs, gateways and endpoints. Benefits: fewer VPCs and attachments, less wasted IP space, and low-latency traffic within the VPC with no peering or Transit Gateway hop, while each team keeps its own account for billing and IAM boundaries. Use it for many accounts that belong in one network environment; use separate VPCs plus Transit Gateway when environments need hard network isolation.
⚠️ Exam Trap: Sharing a Transit Gateway routes nothing by itself. Attachments must be accepted and associated with, and propagated to, the right route tables, and consumers still need IAM permissions on the shared resource.