An application needs a stable outbound IP that a partner can whitelist. How?
IntermediateScenarioVPC and Networking
Answer
Situation read → Outbound IPs come from NAT gateway Elastic IPs, which are stable.
What I'd do →
- Create a NAT gateway with an allocated EIP in each AZ
- Route private subnets through it
- Give the partner all EIPs
- For Lambda, place it in the VPC private subnets so egress uses the NAT
- Verify
curl https://checkip.amazonaws.com
Why → Auto-assigned public IPs change on stop/start, Elastic IPs and NAT EIPs do not.
Interview tip → Mention you need all AZ EIPs on the allowlist, not just one.
More on VPC and Networking
What is a VPC and what are the CIDR constraints?BeginnerWhat makes a subnet public or private?BeginnerHow do route tables work, including the local route and longest-prefix match?IntermediateInternet Gateway vs NAT Gateway: what does each do?BeginnerNAT Gateway vs NAT instance?IntermediateSecurity group vs network ACL: compare them.Beginner