AWS Builder Center
AWS VPC Lattice Cross-Account Hands-on Guide: Sharing Service Networks Across AWS Accounts Using AWS RAM (Part 2)

AWS VPC Lattice Cross-Account Hands-on Guide: Sharing Service Networks Across AWS Accounts Using AWS RAM (Part 2)

In Part 1, we built an Amazon VPC Lattice environment to securely connect applications across isolated VPCs without VPC Peering or AWS Transit Gateway. In this guide, we'll extend the setup by using AWS Resource Access Manager (AWS RAM) to share a VPC Lattice Service Network across AWS accounts. You'll learn how to securely enable cross-account application connectivity while keeping the network architecture simple and scalable.

Series: Building Modern Application Networking with Amazon VPC Lattice (2 articles)

  1. 2
    AWS VPC Lattice Cross-Account Hands-on Guide: Sharing Service Networks Across AWS Accounts Using AWS RAM (Part 2) This article
Community Builder and Browserstack Champion
Introduction
In  Part 1 , we built a simple Amazon VPC Lattice environment consisting of a Provider VPC and a Consumer VPC within the same AWS account. Instead of exposing applications through Public IP addresses or configuring complex routing, we used a VPC Lattice Service and Service Network to enable application-to-application communication.
While this setup demonstrates the fundamentals of Amazon VPC Lattice, enterprise AWS environments typically follow a multi-account architecture. Different teams own different AWS accounts, and applications often need to communicate across those accounts while maintaining strong security boundaries.
Traditionally, organizations solve this using VPC Peering, Transit Gateway, or PrivateLink, each requiring additional networking configuration and operational overhead.
Amazon VPC Lattice introduces a simpler approach. By combining VPC Lattice with AWS Resource Access Manager (AWS RAM), you can securely share a Service Network across AWS accounts, allowing applications to communicate using service names instead of managing network connectivity.
In this article, we'll extend the environment from  Part 1  and implement cross-account application connectivity.



What We'll Build





Prerequisites

Readers should complete  Part 1  before starting.
You'll need:
  • Two AWS accounts
  • IAM permissions for VPC Lattice
  • IAM permissions for AWS RAM
  • Existing Provider Service
  • Existing Service Network
  • Consumer VPC
  • EC2 instances in both accounts



Why AWS RAM?

Your shared authentication service lives in one account.
Your APIs live in another.
Without AWS RAM, every account requires separate networking configuration.
Instead, AWS RAM lets you securely share the Service Network itself.
The consumer account doesn't own the service - it only consumes it.



Step 1 – Create the Resource Share

In the Provider account:
  1. Open AWS Resource Access Manager.
  1. Choose Create Resource Share.
  1. Enter a name such as vpc-lattice-share.
  1. Select Service Network as the resource type.
  1. Choose the Service Network created in Part 1.



Step 2 – Add Principals

Specify who can access the shared Service Network.
You can share with:
  • An AWS Account ID
  • An AWS Organization
  • An Organizational Unit (OU)
For this lab, add the Consumer Account ID.



Step 3 – Accept the Share

Log in to the Consumer account.
Navigate to:
AWS RAM → Shared with me
Accept the invitation.
The shared Service Network is now visible.




Step 4 – Associate the Consumer VPC

Open Amazon VPC Lattice.
Go to Service Networks.
Select the shared Service Network.
Choose Associate VPC.
Select the Consumer VPC.
After association, the Consumer VPC becomes part of the application network.



Step 5 – Verify Connectivity

SSH into the Consumer EC2.
Run:
curl http://<service-dns>
Output:
<h1>Hello from Provider VPC using VPC Lattice!</h1>
The request successfully traverses:
Consumer Account

↓

Consumer VPC

↓

Shared Service Network

↓

Provider Service

↓

Target Group

↓

Provider EC2
output:

No Transit Gateway.
No VPC Peering.
No route propagation.



How AWS RAM Simplifies Cross-Account Networking

Instead of exposing infrastructure, AWS RAM shares the Service Network, allowing controlled access to services without giving administrative control over the provider account.
Benefits include:
  • Centralized service publishing
  • Simplified multi-account connectivity
  • Reduced networking complexity
  • Secure resource sharing
  • Better alignment with AWS Organizations



Traditional Multi-Account Networking vs VPC Lattice + RAM

Traditional Approach
VPC Lattice + AWS RAM
VPC Peering or Transit Gateway
Service Network sharing
Complex routing
No route table changes
Network-level access
Application-level access
IP-based communication
DNS-based service communication
High operational overhead
Simplified management



Best Practices

  • Share only the Service Networks that need to be consumed.
  • Use AWS Organizations or OUs instead of individual account IDs when possible.
  • Apply IAM authentication and authorization policies for production workloads.
  • Monitor service health and access using Amazon CloudWatch and AWS CloudTrail.
  • Keep Provider and Consumer workloads in separate accounts to maintain clear security boundaries.



Key Takeaways

  • AWS RAM enables secure cross-account sharing of VPC Lattice Service Networks.
  • Consumer accounts access applications using a service DNS instead of private IPs.
  • No VPC Peering or Transit Gateway attachments are required.
  • Service ownership remains with the Provider account.
  • Cross-account application networking becomes simpler and more scalable.


Thank you for following along in this part of the Amazon VPC Lattice series. Modern application networking isn't just about connecting VPCs—it's about securely connecting services while reducing operational complexity. With Amazon VPC Lattice and AWS Resource Access Manager (AWS RAM), you can build scalable, multi-account architectures without relying on VPC Peering or AWS Transit Gateway for every connectivity requirement.
I hope this hands-on guide helps you understand how to extend VPC Lattice beyond a single AWS account and confidently build enterprise-ready application networking solutions. If you found this article helpful, share it with your teammates who are designing multi-account AWS environments, and feel free to reach out with your questions or feedback.Happy building! 🚀


Series: Building Modern Application Networking with Amazon VPC Lattice: Secure, Service-to-Service Communication Across AWS Accounts
  1. Secure, Connected, Simplified: Building Modern Application Networking with Amazon VPC Lattice (Part 2 — The Multi-Account)





Series: Building Modern Application Networking with Amazon VPC Lattice (2 articles)

  1. 2
    AWS VPC Lattice Cross-Account Hands-on Guide: Sharing Service Networks Across AWS Accounts Using AWS RAM (Part 2) This article
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article