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.
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! :-)