Public rabbitmq instance on aws is not resolving dns to local ip

Viewed 31

i am experimenting with rabbitMQ on aws. I have a public rabbitMQ instance on public VPC and an ec2 instance. Both are on same subnet, how ever if i resolve public dns of rabbitMQ from ec2 instance, it is resolved to its public ip instead of private Ip. Shouldn't it resolve to local ip. I understand that i can create a private rabbitMQ instance from aws and then public access will have to be given separately if required. But here i specifically want to understand why public rabbitMQ and ec2 being on same subnet not resolving to local ip when i resolve it. Note DNS hostnames and DNS resolution are enabled in public vpc.

0 Answers
Related