#apt install resolvconf
이것을 설정하면은 좀 더 세팅에 편해집니다.
#vi /etc/resolvconf/resolv.conf.d/tail
# IPv4 nameservers
nameserver 1.1.1.1
nameserver 8.8.8.8
nameserver 1.0.0.1
nameserver 8.8.4.4
# IPv6 nameserveros
nameserver 2606:4700:4700::1111
nameserver 2001:4860:4860::8888
nameserver 2606:4700:4700::1001
nameserver 2001:4860:4860::8844
#sudo service resolvconf restart
#apt-get install dnsmasq
# cat /etc/hosts
# cat /etc/resolv.conf
nameserver 172.31.0.2
search ap-northeast-2.compute.internal
# Google IPv4 nameservers
nameserver 8.8.8.8
nameserver 8.8.4.4
# Google IPv6 nameservers
nameserver 2001:4860:4860::8888
nameserver 2001:4860:4860::8844