I'm going crazy because this should be easy especially when following the Amazon documentation. I've been using this reference from Amazon.
Just trying to change the DNS servers that an AWS EC2 instance uses to resolve domain names. Edited the /etc/sysconfig/network-scripts/ifcfg-eth0, set PEERDNS=no, added DNS1=10.0.0.11, saved, rebooted, no dice: Still see the 10.0.0.2 nameserver in /etc/resolve.conf, testing a ping to an internal server's FQDN (server.mycorp.company.com) fails as it requires our internal DNS server to resolve the name. If I manually edit resolv.conf and change the nameserver line to reflect our DNS server 10.0.0.11, the pings work.
Server is running the latest Amazon Linux AMI as far as I can tell, 2017.03. Complete /etc/sysconfig/networking-scripts/ifcfg-eth0:
DEVICE=eth0 BOOTPROTO=dhcp ONBOOT=yes TYPE=Ethernet USERCTL=yes PEERDNS=no DHCPV6C=yes DHCPV6C_OPTIONS=-nw PERSISTENT_DHCLIENT=yes RES_OPTIONS="timeout:2 attempts:5" DHCP_ARP_CHECK=no DNS1=10.0.0.11
* the IP addresses have been changed to protect the innocent