Amazon VPC Lattice

Overview

VPC Lattice provides a service mesh solution for EKS with automatic load balancing, health checking, and traffic management.

Key Features

  • Automatic service discovery
  • Layer 7 load balancing
  • Health checking
  • Traffic management
  • mTLS encryption
  • Access controls

Service Mesh Comparison

FeatureVPC LatticeIstio/Linkerd
ManagementFully managedSelf-managed
mTLSAutomaticManual/config
CostPay per useInfrastructure
ComplexityLowHigh

Create a Service

apiVersion: vpc-lattice.sks.aws/v1
kind: Service
metadata:
  name: my-service
spec:
  port: 8080
  backend:
    name: my-app
    port: 80

Register Targets

apiVersion: vpc-lattice.sks.aws/v1
kind: TargetGroup
metadata:
  name: my-app-tg
spec:
  type: IP
  port: 80
  target:
    - ip: 10.0.0.1
      port: 80
    - ip: 10.0.0.2
      port: 80

Access Policy

apiVersion: vpc-lattice.aws/v1
kind: AccessPolicy
metadata:
  name: allow-consumer
spec:
  source:
    serviceAccounts:
      - name: consumer
        namespace: default
  action:
    - vpc-lattice:Invoke

When to Use VPC Lattice

  • Microservices requiring service-to-service communication
  • Need for automatic mTLS
  • Multi-VPC service access
  • Reduce operational burden of service mesh

References