Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AWS error - sudo: unable to resolve host ip-10-0-xx-xx

I launched a new aws instance. My private ip is ip-10-0-xx-xx as per amazon console. Everytime when I do a sudo command, I get the following error

sudo: unable to resolve host ip-10-0-xx-xx 

How can I rectify this error?

like image 955
Rahul Avatar asked Oct 30 '15 17:10

Rahul


Video Answer


1 Answers

This issue is caused by not enabling enableDnsHostnames in your VPC configuration.

enableDnsHostnames

Indicates whether the instances launched in the VPC get DNS hostnames. If this attribute is true, instances in the VPC get DNS hostnames; otherwise, they do not. If you want your instances to get DNS hostnames, you must also set the enableDnsSupport attribute to true.

http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/vpc-dns.html#vpc-dns-updating

like image 151
Michael - sqlbot Avatar answered Sep 22 '22 11:09

Michael - sqlbot