EC2 instance has no public DNS

后端 未结 18 1372
-上瘾入骨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 17:10

    The change to the DNS Hostnames setting can also be done using the AWS CLI:

    aws ec2 modify-vpc-attribute --vpc-id $vpc_id --enable-dns-hostnames '{"Value": true}'
    

    (Where $vpc_id is the ID of the VPC that your instance is attached to.)

    As soon as the VPC is updated the instance will gain a public DNS.

提交回复
热议问题