0
votes

I have 2 AZs on my VPC. A public and a private subnet in each of them. Currently I have my application deployed on the private subnets and outbound traffic routed using a NAT Gateway on the public subnets of each AZ. The thing is that some vendors have to whitelist my application's IP. Currently I have 2 IPs, one for each NAT Gateway. Is there a way to use the same IP for both of them without losing AZ redundancy so vendor's only need to whitelist a single IP?

2

2 Answers

3
votes

No, as each EIP can only be associated with a single network interface.

The following rules apply: An Elastic IP address can be associated with a single instance or network interface at a time.

See https://docs.aws.amazon.com/vpc/latest/userguide/vpc-eips.html

1
votes

The other thing you could do is something like this: https://aws.amazon.com/blogs/networking-and-content-delivery/creating-a-single-internet-exit-point-from-multiple-vpcs-using-aws-transit-gateway/

Some vendors only allow you to whitelist a limited number of IP's which can be really annoying to deal with.