Skip to content

// blog › aws

AWS · SECURITY · NETWORKING

Share an RDS database across VPCs with a PrivateLink resource gateway

On this page
  1. The problem it solves
  2. The pieces, from the database outwards
  3. Overlapping CIDRs
  4. What to watch
  5. When to use something else
key takeaways
  • A resource gateway is a set of network interfaces in the provider's VPC: the way in. A resource configuration says which resource behind it is shared, on which ports.
  • Consumers reach it through a resource VPC endpoint, or through a VPC Lattice service network. Overlapping CIDRs don't matter, because the consumer only talks to its own endpoint.
  • For Amazon RDS, an ARN-type resource configuration keeps the database's usual DNS names working on the consumer side with Private DNS.
  • It is one-way and TCP-only: connections start from the consumer, and the database sees the gateway's IP addresses.

An AWS PrivateLink resource gateway lets one VPC share a database, or any other TCP resource, with other VPCs and accounts without VPC peering, a Transit Gateway route or a Network Load Balancer in front of it. AWS launched it on 1 December 2024 as "access to VPC resources over AWS PrivateLink", and it is still one of the least known ways to reach Amazon RDS across accounts. This post draws one shared Aurora database reached from two accounts in two different ways, and walks through what each piece does and where the edges are.

diagramOne Aurora database, shared across accounts with a VPC resource gatewayOpen this diagram in archhyOpens in a new tab in the editor, ready to change. No account needed.See it in the diagram library →

The problem it solves

Sharing one database with several teams used to mean wiring networks together. VPC peering needs non-overlapping CIDRs and a route in every route table. A Transit Gateway scales better but still needs unique ranges and its own routing. PrivateLink endpoint services avoided both, but only for something behind a Network Load Balancer, so a database got an NLB in front of it, with target registration to keep in step whenever the database's IP address changed.

A resource gateway removes the load balancer. The provider shares the resource itself, by IP address, by domain name or, for RDS, by its ARN, and each consumer gets a private way in that lives in its own VPC.

The pieces, from the database outwards

Resource gateway

The gateway is the point of inbound traffic into the VPC where the resource lives. It spans several Availability Zones and has its own security group, and traffic leaves it towards the resource from the gateway's own IP addresses. That is why, in the diagram, the database's security group needs to allow only the gateway's security group, not every consumer's range. It does no load balancing: it is a door, not a balancer.

Resource configuration

A resource configuration names what the gateway exposes. It can be a single resource (an IP address or a domain name), a group of child resources, an ARN, or, since autumn 2026, a list of CIDR ranges. Each one sets the TCP port range consumers may use; anything else is refused. ARN-type configurations currently support Amazon RDS only, and not a publicly accessible cluster.

AWS RAM

To reach another account, the resource configuration is shared through AWS Resource Access Manager, and the consumer account accepts the share. Within one account no share is needed. The owner can also stop a configuration being added to service networks that other people can share on.

The consumer side: two ways in

The Payments account in the diagram creates a resource VPC endpoint: a VPC endpoint of type Resource, attached to one resource configuration. With Private DNS on, the payments service keeps using the Aurora cluster's normal writer and reader names, and they resolve to the endpoint. At least one Availability Zone of the endpoint has to overlap with the gateway's.

The Reporting account takes the other route: it adds the shared configuration to a VPC Lattice service network and reaches it through a service network endpoint (or a service network VPC association). This suits a team that already collects many services and resources behind one service network.

Overlapping CIDRs

Payments and the data VPC both use 10.0.0.0/16 in the diagram. With peering that is a dead end; here it isn't, because Payments never routes to the data VPC at all. It sends traffic to its endpoint's addresses in its own VPC, and PrivateLink carries it to the gateway. This is the merger or partner case: two networks that were planned apart and can't be renumbered.

When the target is not an RDS ARN, AWS suggests a resource endpoint per configuration and its DNS name, with a CNAME in a Route 53 private hosted zone if you want a friendlier name.

What to watch

  • One direction only. Connections start from the consumer's VPC. The database can't call back to the payments service through this path.
  • TCP only. UDP isn't carried, apart from DNS queries for CIDR configurations.
  • Certificates and names. Without Private DNS, clients connect to the endpoint's own DNS name, which isn't in the RDS certificate. TLS with hostname checks then fails, so keep Private DNS on for ARN-type RDS configurations.
  • Gateway addresses. The number of IPv4 addresses per gateway interface (1 to 62, default 16) is set when the gateway is made and can't be changed, and it caps concurrent connections. Watch the PortAllocationErrors metric.
  • Domain-name targets. A gateway resolves names with public DNS by default. A name in a Route 53 private hosted zone needs the gateway's DNS resolution set to IN_VPC, and an IN_VPC gateway can't take ARN configurations, so RDS by ARN and private names live on separate gateways.
  • Cost. Resource gateways are billed per GB processed, and consumer endpoints add their own charges. Check current PrivateLink and VPC Lattice pricing for your Region.

When to use something else

If two VPCs need to talk in both directions, or a whole set of workloads needs routing between them, peering or a Transit Gateway is still the tool. If you are already running a Network Load Balancer for other reasons, an endpoint service is fine. A resource gateway is the right fit when one side owns a resource, many sides consume it, and nobody should have to touch anyone else's route tables. For a wider view of how AWS networks fit together, see the multi-tenant SaaS architecture.

Frequently asked questions

A resource gateway is a set of network interfaces in a VPC that acts as the way in to resources in that VPC, such as an RDS database. Together with a resource configuration, which names the resource and its ports, it lets other VPCs and accounts reach the resource privately through PrivateLink or VPC Lattice, without peering, a Transit Gateway or a Network Load Balancer.

No. Share an ARN-type resource configuration for the RDS cluster or instance through AWS RAM, and create a resource VPC endpoint in the consumer VPC. With Private DNS on, applications keep using the database's usual RDS host names, and the networks are never joined, so their CIDRs can even overlap.

A VPC endpoint service shares something that sits behind a Network Load Balancer or Gateway Load Balancer. A resource endpoint connects to a resource configuration behind a resource gateway, so the resource needs no load balancer in front of it. Both are consumer-side VPC endpoints that start connections in one direction only.

Anything reachable over TCP by a private IP address or a domain name, Amazon RDS databases by ARN, and, with tunnel endpoints added in 2026, whole CIDR ranges. ARN-type configurations currently support Amazon RDS only, and not publicly accessible clusters.

based on Discussed from AWS's VPC resource gateways: implementation patterns and use cases (AWS Networking and Content Delivery Blog), summarised on LinkedIn by Flah Ahmad of AWS, and the AWS PrivateLink user guide. The diagram and commentary are archhy's own.