# Deploying elastic from AMI results in duplicate ID

**URL:** <https://discuss.elastic.co/t/deploying-elastic-from-ami-results-in-duplicate-id/86488>\
**Category:** Elasticsearch\
**Created:** [May 19, 2017, 8:34pm UTC](https://discuss.elastic.co/t/deploying-elastic-from-ami-results-in-duplicate-id/86488 "2017-05-19T20:34:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Justin.DynamicD](https://avatars.discourse-cdn.com/v4/letter/j/f4b2a3/32.png) [@Justin.DynamicD](https://discuss.elastic.co/u/Justin.DynamicD)\
**Post date:** [May 19, 2017, 8:34pm UTC](https://discuss.elastic.co/t/deploying-elastic-from-ami-results-in-duplicate-id/86488/1 "2017-05-19T20:34:29Z")

</div>

In AWS, I attempted to create a node then save it as an AMI. When testing deployment, the new node would not join the cluster, as it complained "a node with a different name but duplicate ID exists".

Obviously a side affect of cloning into an AMI, but is there a "formal" way of scrubbing an elasticsearch node so when deployed it can cleanly join a cluster?

The original plan was to build a coordinating node/kibana instance then put it behind an auto-scaling group .. but currently any node past the first will have issues.

---

<div class="post-metadata">

**Author:** ![Justin.DynamicD](https://avatars.discourse-cdn.com/v4/letter/j/f4b2a3/32.png) [@Justin.DynamicD](https://discuss.elastic.co/u/Justin.DynamicD)\
**Post date:** [May 19, 2017, 9:48pm UTC](https://discuss.elastic.co/t/deploying-elastic-from-ami-results-in-duplicate-id/86488/2 "2017-05-19T21:48:56Z")

</div>

Solved.

Turns out after testing I need to delete the data dir on the new AMI. Having existing data caused this issue.

---

<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:** [June 16, 2017, 9:49pm UTC](https://discuss.elastic.co/t/deploying-elastic-from-ami-results-in-duplicate-id/86488/3 "2017-06-16T21:49:03Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
