In an enterprise environment, the company usually operates its own DNS servers.
When a Linux instance launches in AWS, the DNS settings only contain the AWS DNS server. If the company DNS server settings are applied with Chef, during the first Chef Client run those settings do not take effect.
When we reference an internal DNS entry during the first Chef Client run we get the error message:
There two solutions to handle this:
- Use the IP address of the internal server or load balancer in the URL ( switch from HTTPS to HTTP, because the SSL certificate will not work with the IP address),
- Set the DNS servers of the Linux server with Packer when you generate the base image.