title: How to get the instance Name from the instance in AWS?
body: <p>I'm trying to set up a means to register an instance in route53 automatically when the instance is created, using salt and <a href="https://web.archive.org/web/20130906075018/http://cantina.co/2012/01/25/automated-dns-for-aws-instances-using-route-53/" rel="nofollow noreferrer">this article</a>.</p>
  <p>The article uses <code>ec2-metadata</code> to get the instance-id and and the hostname. I'm wondering if there is a way, using bash within the instance, to get the instance Name instead. <code>ec2-metadata</code> only seems to show the instance-id. Thanks in advance.</p>