1
votes

I have an VPC instance created on AWS. But it doesn't have a public DNS value as opposed to my other instance which is a straight EC2 instance.

eg ec2-45-55-79-ap-southeast-1.compute.amazonaws.com

Is there a way to assign a "Public DNS" value like the one above for my VPC instance?

Cheers to anyone who knows!!

2
Does it not have a public DNS value or does it also not have a public ip? - Frederick Cheung
@FredrickCheung I have a public IP which is an elastic IP. But I dont have a public DNS value and I'm wondering can I get one? - Andrew Duffy

2 Answers

1
votes

The default public DNS name is assigned based on your VPC configuration. Make sure that the following settings are set in the VPC console (https://console.aws.amazon.com/vpc/):

  1. DNS resolution and DNS hostnames attributes are set to True in your VPC
  2. You have the DHCP options set with default provider AmazonProviderDNS. Something like: domain-name = ap-southeast-1.compute.internal domain-name-servers = AmazonProvidedDNS

More details for DHCP Options Set configuration: http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_DHCP_Options.html

0
votes

You need to make sure that the instance is launched into a public subnet, and then you can assign an elastic IP.