References:
https://aws.amazon.com/premiumsupport/knowledge-center/dns-resolution-failures-ec2-linux/ https://help.ubuntu.com/community/Dnsmasq#Local_DNS_Cache
On Amazon linux:
Run below command to install network utils like dig
and vim editor
sudo yum install bind-utils vim