How do you expose a service in one VPC to a customer's VPC without peering?
IntermediateScenarioVPC & Cloud Network Design
Answer
Situation read → This is the PrivateLink use case: one-way service exposure without full network connectivity or CIDR coordination.
What I'd do →
- Put the service behind a Network Load Balancer or Gateway LB
- Create a VPC endpoint service pointing at the NLB and require acceptance
- The consumer creates an interface endpoint to your service name in their VPC
- Allow principals with
aws ec2 modify-vpc-endpoint-service-permissions - Consumer sees a private IP in their subnet and overlapping CIDRs do not matter
Why → PrivateLink is unidirectional and NATs the connection, so neither side exposes its network.
Interview tip → Mention that this is how most SaaS vendors offer private access.
More on VPC & Cloud Network Design
What makes a subnet public versus private in AWS?BeginnerExplain internet gateway versus NAT gateway and when you use each.BeginnerPrivate instances need to pull packages from the internet but must not be reachable from it. What do you set up?BeginnerWhy shouldn't production run in the default VPC?BeginnerPublic IP, Elastic IP and private IP: how do they differ on EC2?BeginnerWhy use SSM Session Manager instead of a bastion host?Beginner