I have several instances running in the same security group(Say: Group-A) that needs to talk with each other, in particular, port 4369.
Each instance has a different Elastic IP.
The Security Group is configured to allow inbound traffic via TCP:4369 Soruce:sg-XXXXX (Group-A)
However, instances can only talk to each other via internal IP (10.xxx.xxx.xx) or Amazon Public DNS: ec2-ELASTIC-IP.compute-1.amazonaws.com(Apparently Amazon will translate this to the internal IP).
If I use Elastic IP, it won't work. If I use my own FQDN that pointed to the Elastic IP, it won't work.
If I change the source in inbound rule from sg-XXXXX (Group-A) to 0.0.0.0, it works with my own FQDN and the Elastic IP. But we won't use this for security concerns. If I remove the inbound rule, nothing works, even use the internal IP.
So what should I do if I want to use my own FQDN? (worker-1.company.com -> Elastic IP), which is much more readable and easier to manage.