# How to retrieve EC2 internal IP using Tags?

**URL:** <https://forum.ansible.com/t/how-to-retrieve-ec2-internal-ip-using-tags/17420>\
**Category:** Ansible Project\
**Tags:** aws\
**Created:** [February 2, 2015, 5:17pm UTC](https://forum.ansible.com/t/how-to-retrieve-ec2-internal-ip-using-tags/17420 "2015-02-02T17:17:13Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pradeep\_Bhadani](https://avatars.discourse-cdn.com/v4/letter/p/df788c/32.png) [@Pradeep\_Bhadani](https://forum.ansible.com/u/Pradeep_Bhadani)\
**Post date:** [February 2, 2015, 5:17pm UTC](https://forum.ansible.com/t/how-to-retrieve-ec2-internal-ip-using-tags/17420/1 "2015-02-02T17:17:13Z")

</div>

Hey ,

I want to retrieve internal IP / hostname of EC2 machine which hase some tags.  
How can i retrieve based on tags?

I was reading this : [docs.ansible.com/intro\_dynamic\_inventory.html#example-aws-ec2-external-inventory-script./](http://docs.ansible.com/intro_dynamic_inventory.html#example-aws-ec2-external-inventory-script./) , but this requires “host” argument , which i do not want to use.

Thanks,  
Pradeep
