Problem/Solution TIP: What to do in case AWS EC2 instance looses public IPv4 DNS with attached ElasticIP
Just a quick and very specific tip. Writing here, because “google did not help”, so maybe it will be useful for someone.
The problem: Our EC2 machine lost connectivity to external resources (there was no outgoing traffic) after reboot. It had associated ElasticIP, but public DNS for the instance could not have been resolved.
Solution: The instance had 2 network interfaces associated
from different VPCs and the problem arose because during the reboot ElasticIP was associated WITH THE WRONG interface! So I had to re-associate it to another network interface and that’s it.