Which solution will meet these requirements?
Add a NAT gateway in the public subnet of each Availability Zone. Make the NAT gateway the default route of all private subnets in those Availability Zones.
Allocate one Elastic IP address in each Availability Zone. Associate the Elastic IP address with all the instances in the Availability Zone.
Place the instances behind a Network Load Balancer (NLB). Send the traffic to the internet through the private IP address of the NLB.
Update the main route table to send the traffic to the internet through an Elastic IP address that is assigned to each instance.
Explanations:
NAT gateways in each Availability Zone allow instances in private subnets to access the internet using the NAT gateway’s Elastic IP. This setup provides a small set of static IPs that can be shared by instances across Availability Zones.
Elastic IPs cannot be directly assigned to multiple instances. Elastic IPs are only associated with individual instances or resources like NAT gateways, so this does not meet the requirement.
Network Load Balancers do not provide static outbound IPs. They are primarily for distributing inbound traffic and cannot route traffic to the internet with a static IP.
Updating the main route table with individual instance Elastic IPs would require each instance to have its own public Elastic IP, which would not meet the static IP requirement efficiently and is costly to maintain.