AWS DHCP options are set on a per-VPC (Virtual Private Cloud) basis. By default, things like the search scope and DNS servers used by a given AWS Instance are set by DHCP which also provides the private IP address (but not any Elastic IP Addresses). Indeed, the Amazon Virtual Private Cloud is a fundamental core service that makes AWS very useful when managing complex and distinct instances and networks. VPCs include addressing, subnets, security, routing, and offer things like VPNs-as-a-service.
Setting AWS DHCP Options
Go to the VPC console in AWS. Note that DHCP Options cannot be edited, they can only be created, assigned, and deleted. Create a new one without the search scope and with preferred DNS servers. Then Assign to given instances. After assigning them, any DHCP Options that are not assigned to any VPC can be deleted.
Amazon Lightsail and VPCs
There seems to be no evidence that Amazon Lightsail offers any kind of VPC ifrastructure that can be managed (including DHCP Options) and likely each Lightsail instance is its own VPC with default DHCP settings (that cannot be set as above). In which case:
Edit the file
/etc/sysconfig/network-scripts/ifcfg-eth0 or otherwise appropriate configuration files for a network interface.
Change contents as such:
PEERDNS=no DNS1=184.108.40.206 DNS2=220.127.116.11
Change DNS entries to the desired.
Additional Resources and Implications, including a variety of DNS solutions
- Gracenote has a nice script for getting private DNS working inside of a VPC
- AWS VPC using Private Hosted Zones with Route53
- On-premise and AWS dns resolution with private DNS
- Hybrid DNS in AWS for the Enterprise
- VPC DHCP options - AWSomeBlog