Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

EC2 t2.micro instance has no public DNS

I launched an Amazon Web Service (AWS) EC2 Instance, t2.micro, which must be launched into a VPC.

The VPC has Auto-assign Public IP set to Yes.

DNS resolution: Yes

DNS hostnames: Yes

But on the EC2 Dashboard, the instance still has a blank Public DNS and Public IP. I have tried to restart the instance several times, but it still has not been assigned a Public IP. The 5 Elastic IPs that came with our AWS account have already been used. Is it possible to get a Public IP assigned to a t2.micro instance without using Elastic IP?

I have read the post: EC2 instance has no public DNS, but I do not have reputation points to be able to add a comment, so I am posting this as new question.

like image 321
J21042 Avatar asked Nov 03 '14 01:11

J21042


People also ask

Why doesn't my EC2 have a public DNS?

It is related to the VPC's feature called "DNS Hostnames". You can enable or disable it. Go to the VPC, under the Actions menu select the "Edit DNS Hostnames" item and then choose "Yes". After doing so, the public DNS of the EC2 instances should be displayed.

Why public IP is not showing in EC2 instance?

The most common reason for no public IP address for your EC2 instance is that you are launching your EC2 instance using a private subnet. A private subnet means any EC2 instances located in that subnet aren't directly addressable from the public web.

What is instance type T2 Micro?

T2. Amazon EC2 T2 instances are Burstable Performance Instances that provide a baseline level of CPU performance with the ability to burst above the baseline. T2 Unlimited instances can sustain high CPU performance for as long as a workload needs it.


1 Answers

Rightclick on the VPC row in the VPC management console page and select "EDIT DNS Hostname". Set it to "Yes". It´s necessary to allow all the instances with the same VPC.

When you create the new instance in the "Step 3: Configure Instance Details", you need to enable "Auto-assign Public IP".

That´s it! :-)

like image 139
Laura Liparulo Avatar answered Sep 20 '22 20:09

Laura Liparulo