in gamelift-daemon/src/ec2_metadata/ec2_metadata.py [0:0]
def public_hostname(self):
resp = self._get_url(METADATA_URL + "public-hostname", allow_404=True)
if resp.status_code == 404:
return None
return resp.text