I have Elastic Beanstalk instances accessible through an ALB in public subnets and want to assign them a single IP address (A partner asked us for an IP to whitelist to access their services)
I have followed https://medium.com/@obezuk/how-to-use-elastic-beanstalk-with-an-ip-whitelisted-api-69a6f8b5f844 i.e.
- created a new subnet, NAT gateway and route table
- route all traffic of the new NAT subnet to the internet gateway in the NAT route table
- route all traffic from the public subnets hosting the EC2 instances in the main route table
but then no traffic reaches my EC2 instances. I know that the NAT gateway's use case is for instances in private subnet to reach the internet, but do you know why that might happen when everything is in public subnets?