Lesson 2 of 6 Container Platforms and Microservices

Connecting Microservices with Service Connect and VPC Lattice

This lesson explains how ECS Service Connect and Amazon VPC Lattice provide discovery, traffic management, authorisation and metrics between microservices, and when a self-managed mesh is still used.

Learning outcomes

After completing this lesson, you will be able to:

  • Describe what ECS Service Connect adds to ECS services.
  • Explain how VPC Lattice connects services across VPCs and accounts with IAM authorisation.
  • Choose a service communication approach from the compute types and network constraints.

Amazon ECS Service Connect

ECS Service Connect gives each ECS service a short name in an AWS Cloud Map namespace and injects a managed proxy into each task. Clients call other services by name; the proxy provides client-side load balancing, retries, outlier detection that stops sending traffic to failing tasks, and per-call connection and request metrics in CloudWatch. No application changes or mesh control plane are needed, and it works between services in different ECS clusters that share a namespace.

Amazon VPC Lattice

VPC Lattice connects services across VPCs and accounts, whatever compute they run on (EC2, ECS, EKS or Lambda), without VPC peering or Transit Gateway routes and even with overlapping CIDRs. A service network is shared with accounts through AWS RAM; listeners route by path, header or weight; and auth policies use IAM to authorise each request by principal and request attributes. The lesson Connecting Microservices Across Accounts with Amazon VPC Lattice in the Advanced Networking chapter covers its building blocks in detail.

Choosing an approach

Self-managed meshes such as Istio remain possible on EKS when teams need their advanced features, but they add a control plane and sidecars to operate; AWS App Mesh reached end of support in September 2026. The following comparison summarises the managed options.

ECS Service Connect
Clients and targetsECS services
Across VPCs and accountsWithin shared namespaces
AuthorisationNetwork-level
OperationsFully managed
Choose when ECS-only microservices needing discovery, retries and metrics.
VPC Lattice
Clients and targetsEC2, ECS, EKS, Lambda
Across VPCs and accountsYes, through service networks
AuthorisationIAM auth policies per request
OperationsFully managed
Choose when Mixed compute across many VPCs and accounts with IAM authorisation.
Self-managed mesh on EKS
Clients and targetsKubernetes workloads
Across VPCs and accountsWith extra networking
AuthorisationMesh policies (for example mTLS)
OperationsCustomer operates control plane
Choose when Teams that need specific open-source mesh features.
Sort into groups

Service Connect or VPC Lattice?

Exam skills 1.1.7

Choose how services should find and call each other.

Log in to try this activity Interactive activities are free with an account.
Worked example

Two estates, two tools

A company runs 40 ECS services for its storefront in one account, and its payment services run on EKS and Lambda in separate PCI accounts with overlapping CIDRs.

Storefront services use Service Connect within one namespace, which gives them short names, retries and per-service metrics without code changes.

The storefront calls payments through VPC Lattice: the payments team shares a service network with the storefront account, and an auth policy allows only the checkout service's role to call POST /charge. No network routes between the accounts are needed.

Check yourself

Why can VPC Lattice connect services in VPCs whose CIDR ranges overlap?

Show answer

Clients send requests to the Lattice service, which proxies them to targets, so no route between the VPCs is needed and their address ranges never meet.

Exam Tips

Remember for the exam

  • ECS services need discovery, retries and per-call metrics with no code changes: ECS Service Connect.
  • Mixed compute across accounts and overlapping CIDRs with IAM authorisation: VPC Lattice.
  • Authorise a specific caller and path: VPC Lattice auth policy.
  • App Mesh reached end of support; do not design new solutions on it.