EC2 instance in Default VPC = AWS provides it with public and private DNS hostnames that correspond to the public IPv4 and private IPv4 addresses for the instance.
EC2 instance in non-default VPC = AWS provides the instance with a private DNS hostname only.
Public DNS hostname only if:
If you have set the DNS resolution and DNS hostnames to true.