@shivaram  in the original version of start-*.sh, there is some EC2 specific code to set SPARK_PUBLIC_DNS, but that is out-of-date due to the change of hostname of ec2 instance. When users deploy spark on ec2 manually (not through spark-ec2), the worker UI will start in a private IP, causing the webUI linked to an unaccessible page

@JoshRosen yes, I also felt that introducing IAAS provider-specific code here is not so elegant .