Connecting Microservices Across Accounts with Amazon VPC Lattice
This lesson explains how Amazon VPC Lattice provides discovery, routing, authentication and observability between microservices across accounts and VPCs at the application layer, without peering, transit gateway routes or a self-managed service mesh.
Learning outcomes
After completing this lesson, you will be able to:
- Describe service networks, services and target groups.
- Explain how listener rules route requests and auth policies authorise calls.
- Describe how service networks are shared and observed.
- Choose between VPC Lattice, PrivateLink and Transit Gateway.
Building blocks
Amazon VPC Lattice connects services across VPCs and accounts at the application layer, without the networks themselves being connected, and it is built from four resources. A service is a unit of the application, such as an orders API. It has listeners for HTTP, HTTPS, gRPC or TCP, and rules that route requests. A target group is what actually serves the requests: EC2 instances, IP addresses, ECS tasks, EKS pods, Lambda functions or ALBs. A service network groups services into a logical boundary, and any VPC associated with it can reach its services. An auth policy is an IAM resource policy on the service network or a service, evaluated for every request, so access can depend on the caller's IAM identity. The following table summarises the resources.
| Resource | Purpose |
|---|---|
| Service | A unit of the application, with listeners (HTTP, HTTPS, gRPC or TCP) and rules |
| Target group | EC2 instances, IP addresses, ECS tasks, EKS pods, Lambda functions or ALBs that serve the service |
| Service network | A logical boundary that groups services; VPCs associated with it can reach its services |
| Auth policy | An IAM resource policy on the service network or service, evaluated for every request |
The following diagram shows how the four resources fit together.

Routing and security
Each Lattice service has listeners whose rules route requests by path, header or method to target groups, and a rule can split traffic between target groups by weight, which supports blue/green and canary releases, for example moving a service from EC2 instances to Lambda gradually. Because Lattice connects services rather than networks, the client and the service can be in VPCs with overlapping address ranges.
Security is layered. Auth policies on the service network and on each service are IAM resource policies evaluated for every request; with the IAM auth type, clients sign requests with SigV4, and a policy can allow or deny by the caller's IAM principal, organisation or tags. This gives zero-trust authorisation between services without certificates or a service mesh. Network controls still apply: security groups on the association between a VPC and the service network decide which workloads may send traffic, and network ACLs apply as usual.
Sharing and observability
Services and service networks are shared with other accounts through AWS RAM, so a platform team can own the service network and application teams can add their services to it. Access logs go to CloudWatch Logs, S3 or Firehose, and CloudWatch metrics report requests, latency and errors per service.
Lattice compared with PrivateLink and Transit Gateway
VPC Lattice overlaps in purpose with PrivateLink and Transit Gateway, and the exam distinguishes them by what is being connected. PrivateLink exposes one service to consumers in one direction, without routing or per-request authorisation; it suits a provider offering a service to many consumers. Transit Gateway joins whole networks at layer 3, after which anything can reach anything that routes and security groups allow; it suits broad network connectivity, including on-premises networks.
Lattice joins applications at layer 7: many services and many clients, with routing, IAM authorisation and metrics per request, and no route tables to manage. Lattice resource configurations extend the same model to TCP resources, such as a database in another VPC, so clients reach a specific resource rather than its whole network. The following table summarises the choice.
| Need | Best fit |
|---|---|
| Offer one service privately to many consumer VPCs | PrivateLink |
| Connect whole networks, including on premises | Transit Gateway or Cloud WAN |
| Service-to-service calls with routing and IAM authorisation | VPC Lattice |
| Reach one resource in another VPC with overlapping CIDRs | PrivateLink or Lattice resource configurations |
Lattice, PrivateLink or Transit Gateway?
Authorising service-to-service calls
Dozens of teams run microservices in separate accounts. The refunds service must accept POST /refunds only from workloads in the payments OU, while any service in the organisation may read refund status. The platform team owns a service network shared through RAM, and the refunds team attaches this auth policy to its service:
{
"Version": "2012-10-17",
"Statement": [
{ "Effect": "Allow", "Principal": "*", "Action": "vpc-lattice-svcs:Invoke",
"Resource": "*",
"Condition": {
"StringEquals": { "vpc-lattice-svcs:RequestMethod": "GET", "aws:PrincipalOrgID": "o-a1b2c3d4e5" } } },
{ "Effect": "Allow", "Principal": "*", "Action": "vpc-lattice-svcs:Invoke",
"Resource": "arn:aws:vpc-lattice:eu-west-1:666666666666:service/svc-0refunds/refunds",
"Condition": {
"StringEquals": { "vpc-lattice-svcs:RequestMethod": "POST" },
"ForAnyValue:StringLike": { "aws:PrincipalOrgPaths": ["o-a1b2c3d4e5/r-ab12/ou-ab12-payments/*"] } } }
]
}Callers sign requests with SigV4 using their IAM role, so Lattice knows exactly who is calling. No transit gateway routes or peering are needed, overlapping CIDRs do not matter, and a listener rule can later send 10% of traffic to a new version of the service for a canary release. Exposing the same service with PrivateLink would provide connectivity but none of this per-request authorisation or routing.
What does a VPC Lattice service network provide?
Show answer
Application-layer connectivity between services across VPCs and accounts, with routing, auth policies and monitoring, without peering or transit gateway routes.
Exam Tips
Remember for the exam
- Service-to-service authentication, routing and observability across accounts point to VPC Lattice.
- Lattice auth policies authorise each request by IAM principal or organisation.
- Weighted routing in Lattice supports canary and blue/green releases between targets.
- Share Lattice service networks and services with other accounts through AWS RAM.
- Lattice works with overlapping CIDRs because it connects services, not networks.