<div dir="ltr">That's possible, but EC2 instances should only change their hostnames after a physical reboot or after being shut-off and turned on. This has been my experience at least.<div><div><br></div><div>I believe the default work dir for varnishd is /var/lib/varnish/<hostname>, so if you have a changing hostname that could potentially cause issues. I'm not sure how that would affect varnishncsa and varnishlog.</div>
<div><br></div><div>You can hard-code this directory using the <font face="courier new, monospace">-n</font> option when starting varnishd.</div></div></div>