EC2 instance has no public DNS

后端 未结 18 1356
-上瘾入骨i
-上瘾入骨i 2020-12-22 16:26

A guy I work with gave me the EC2 credentials to log onto his EC2 console. I was not the one who set it up. Some of the instances show a public dns name and others have a bl

18条回答
  •  南方客
    南方客 (楼主)
    2020-12-22 16:47

    Here I will summarize the most common issues that occur:

    When you create a custom VPC, if you want aws resources such as ec2 instances to acquire public IP addresses so that the internet can communicate with them, then you first must ensure that the ec2 instance is associated with a public subnet of the custom VPC. This means that subnet has an internet gateway associated with it. Also, you need to ensure that the security group of the VPC associated with ec2 instance has rules allowing inbound traffic to the desired ports, such as ssh, http and https. BUT here are some common oversights that still occur:

    1) You must ensure that DNS hostnames is enabled for the VPC

    2) You must ensure the public subnet linked to the EC2 instance has its 'auto-assignment of public ip' flag enabled

    3) If the instance is already created, then you might need to terminate it and create a new instance for the public IP and public DNS fields to be populated.

提交回复
热议问题