# AWX EC2 Inventory Names

**URL:** <https://forum.ansible.com/t/awx-ec2-inventory-names/35747>\
**Category:** AWX Project\
**Tags:** awx, aws\
**Created:** [September 16, 2021, 4:32pm UTC](https://forum.ansible.com/t/awx-ec2-inventory-names/35747 "2021-09-16T16:32:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tony1](https://avatars.discourse-cdn.com/v4/letter/t/858c86/32.png) [@Tony1](https://forum.ansible.com/u/Tony1)\
**Post date:** [September 16, 2021, 4:32pm UTC](https://forum.ansible.com/t/awx-ec2-inventory-names/35747/1 "2021-09-16T16:32:57Z")

</div>

Hi,

I have an AWX inventory which syncs with AWS EC2.

I would like the AWX Name of the host to match the value of the EC2 hosts tag “Name”. Otherwise the AWX host name will be the public DNS name.

Can someone please help me on this one?

Thanks!

Tony

---

<div class="post-metadata">

**Author:** ![Tony1](https://avatars.discourse-cdn.com/v4/letter/t/858c86/32.png) [@Tony1](https://forum.ansible.com/u/Tony1)\
**Post date:** [September 18, 2021, 6:58am UTC](https://forum.ansible.com/t/awx-ec2-inventory-names/35747/2 "2021-09-18T06:58:22Z")

</div>

Anyone any idea?

When aws EC2 nodes are syncd, I want their name in AWX to be a tag rather than the long EC2 name.

---

<div class="post-metadata">

**Author:** ![Tony1](https://avatars.discourse-cdn.com/v4/letter/t/858c86/32.png) [@Tony1](https://forum.ansible.com/u/Tony1)\
**Post date:** [September 20, 2021, 11:15am UTC](https://forum.ansible.com/t/awx-ec2-inventory-names/35747/3 "2021-09-20T11:15:33Z")

</div>

For anyone interested

Adding the below to source variables sets the inventory hostname to your chosen tag:

hostnames:

- tag:Name
