# Script to mirror node name to ec2 Name

**URL:** <https://discuss.elastic.co/t/script-to-mirror-node-name-to-ec2-name/8964>\
**Category:** Elasticsearch\
**Created:** [September 9, 2012, 7:25pm UTC](https://discuss.elastic.co/t/script-to-mirror-node-name-to-ec2-name/8964 "2012-09-09T19:25:32Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![barnybug\_2](https://avatars.discourse-cdn.com/v4/letter/b/9fc29f/32.png) [@barnybug\_2](https://discuss.elastic.co/u/barnybug_2)\
**Post date:** [September 9, 2012, 7:25pm UTC](https://discuss.elastic.co/t/script-to-mirror-node-name-to-ec2-name/8964/1 "2012-09-09T19:25:32Z")

</div>

I wrote this script for a bit of fun.

It sets ec2 instance Names to the name of the elasticsearch node running on  
them.

> <https://gist.github.com/barnybug/3686635>

It's come in very handy when debugging system level problems as it makes  
nodes much more identifiable in the Amazon console.  
Works great with ec2-ssh from instagram, eg to restart an elasticsearch  
node by name:  
$ ./ec2names.py  
$ ec2-ssh Lucifer 'service elasticsearch restart'

B

--

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 3:13am UTC](https://discuss.elastic.co/t/script-to-mirror-node-name-to-ec2-name/8964/2 "2017-07-06T03:13:32Z")

</div>


