A partner will only send traffic to IP addresses on their firewall allowlist, but your endpoint currently sits behind an AWS Application Load Balancer. How does moving to a Network Load Balancer solve this, and exactly what would the partner allowlist?
answer
- a DNS name is not an address
- one address per enabled subnet
- bring your own Elastic IP
- give them every AZ, not just one
- inbound address is not the outbound one
basics
~20 sA Network Load Balancer gets one IP address per enabled subnet, and you can pin each to an Elastic IP you own at creation time. The partner allowlists those addresses — one per Availability Zone — instead of a DNS name.
solid answer
~50 sAn ALB is published as a DNS name; the addresses behind that name belong to AWS, and they change as the load balancer scales, so there is nothing stable for a partner to allowlist. An NLB provisions **one IP address per enabled subnet**, and in the subnet mapping you can supply your own Elastic IP for each. Those addresses are fixed for the life of the load balancer, so the partner allowlists a small, known set — one entry per Availability Zone you enable. Two practical points: the Elastic IPs are attached in the subnet mapping when the load balancer is created, so plan the AZs up front, and give the partner every AZ's address, not just the one you tested, because the DNS name resolves to all of them. If you must keep the ALB, AWS Global Accelerator puts two static anycast addresses in front of it instead.
go deeper
Know that an NLB has real IP addresses — one per Availability Zone, optionally your own Elastic IPs — while an ALB is reachable only by DNS name, and say which one a firewall allowlist needs.
Explain why ALB addresses move as the load balancer scales, how the subnet mapping pins an Elastic IP per subnet at creation, and why every enabled zone's address must be allowlisted.
Separate the directions in the design: inbound allowlists cover load balancer addresses, outbound ones cover NAT gateway addresses. Own the address inventory rather than resolving DNS to find out what to send.
Treat public IP addresses as a long-lived asset with change-control cost at the partner. Decide organization-wide whether ingress addresses come from Elastic IPs you hold, from Global Accelerator, or from CloudFront, so partner integrations are not re-negotiated per team.
## Why the ALB has nothing to allowlist An Application Load Balancer is reached through a DNS name such as `my-alb-123456.eu-west-1.elb.amazonaws.com`. Behind that name sit load-balancer nodes whose addresses come from the AWS pool. As traffic grows and shrinks, AWS adds and removes nodes and the resolved set changes. Nothing about those addresses is contractual. Allowlisting them works for a day and then silently breaks — the worst possible failure mode, because it looks like an intermittent network problem months later. ## What an NLB provides instead When you create a Network Load Balancer you choose the subnets it operates in — one per Availability Zone. For each of those subnets the NLB takes exactly one IP address, and you have a choice: - let AWS assign it (a public address for an internet-facing NLB, or a private address from the subnet for an internal one), or - supply your own **Elastic IP** allocation in the subnet mapping. Those addresses do not rotate as the load balancer scales. That stability is the entire point: it is what turns "our partner needs an allowlist" from a blocker into a ticket. ```bash aws elbv2 create-load-balancer \ --name partner-edge-nlb --type network --scheme internet-facing \ --subnet-mappings \ SubnetId=subnet-0a1b2c3d,AllocationId=eipalloc-0aaa1111 \ SubnetId=subnet-0e4f5a6b,AllocationId=eipalloc-0bbb2222 ``` The reason to bring your own Elastic IPs rather than accept AWS-assigned addresses is ownership of the address itself: an Elastic IP you allocated stays yours across a rebuild of the load balancer, so a future migration does not require the partner to re-run their change-control process. AWS-assigned NLB addresses are stable for the life of *that* load balancer, and a new load balancer gets new ones. ## What the partner actually allowlists All of the addresses, one per enabled AZ. This is the mistake teams make: someone resolves the NLB's DNS name once, sees a single address, sends that one address to the partner, and the integration works — until a client resolves a different AZ's address and is dropped by the firewall. The NLB's DNS name returns the addresses of the enabled zones, so any of them can be the one a given client uses. Direction matters too, and it is worth stating explicitly in an interview because it is the most common misunderstanding of the whole question. The NLB's addresses are what the partner sees when *they* connect *to you*. They are not the source addresses of connections your workload initiates outbound — outbound traffic from instances in private subnets leaves via a NAT gateway and carries the NAT gateway's Elastic IP, and that is a different address to allowlist for a different direction. If the partner needs to allowlist your outbound calls, you are talking about NAT gateway addresses, not load balancer addresses. ## Alternatives worth naming If you need the ALB's layer-7 features and a stable address, you have two clean options: 1. **NLB in front of the ALB.** Register the ALB as a target of the NLB. The Elastic IPs live on the NLB; host and path routing and WAF stay on the ALB. 2. **AWS Global Accelerator.** It fronts ALBs, NLBs, EC2 instances and Elastic IPs with two static anycast IP addresses and routes traffic over the AWS backbone from the nearest edge location. This also gives you a fixed pair of addresses without a second load balancer in your VPC, and it changes the latency profile for distant clients. ## The judgment being tested The interviewer is checking whether you know that an address requirement is a real architectural constraint rather than a configuration detail, and whether you understand which AWS component owns each address in the path: NLB addresses for inbound, NAT gateway addresses for outbound, and CloudFront or Global Accelerator when the answer needs to be an anycast edge rather than a regional endpoint.
- The partner also needs to allowlist the traffic your service sends to them. Is that the same address?No. The NLB address is only what inbound clients connect to. Calls your workload initiates from private subnets egress through a NAT gateway and carry that gateway's Elastic IP, so that is the address the partner allowlists for the outbound direction. Give them both sets and label which direction each covers.
- Can you attach Elastic IPs to an NLB after it is already running?Plan for no. The Elastic IP allocations are supplied in the subnet mapping when the load balancer is created, so retrofitting them generally means creating a new NLB and cutting traffic over. That is why the AZ set and address ownership are decisions to make before the first deployment, not after.
saying these in an interview costs you the question
- Suggests allowlisting the resolved ALB addresses
- Sends the partner only one AZ's address
- Thinks the NLB IP is also the outbound source address
- Believes an ALB has a configurable static IP
- Assumes Elastic IPs can be bolted on to any existing NLB