Skip to content

Instantly share code, notes, and snippets.

@ddierickx
Last active May 7, 2018 14:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ddierickx/d19d7ed442ff79893a05984b1e46ad3b to your computer and use it in GitHub Desktop.
Save ddierickx/d19d7ed442ff79893a05984b1e46ad3b to your computer and use it in GitHub Desktop.
Resolve AWS EMR hostnames on MacOS

To resolve AWS EMR hostnames from your MacOS machine you'll need to install and configure dnsmasq:

brew install dnsmasq

Add the following to /usr/local/etc/dnsmasq.conf

# configure resolution of AWS EMR hostnames
address=/eu-west-1.compute.internal/127.0.0.1
synth-domain=eu-west-1.compute.internal,0.0.0.0,255.255.255.255,ip-

Start dnsmasq:

brew services start dnsmasq

Configure DNS for each network interface by going to "System Preferences", "Network", (for each adapter), "Advanced", "DNS". Take a screenshot! Click the "+" sign and add "127.0.0.1" and all entries that were already there (UI glitch...).

Try out resolution with:

dig ip-171-120-13.eu-west-1.compute.internal

Should return:

;; ANSWER SECTION:
ip-171-120-13.eu-west-1.compute.internal. 0 IN A 171.120.13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment