# aws ec2 inventory filters

**URL:** <https://forum.ansible.com/t/aws-ec2-inventory-filters/33674>\
**Category:** AWX Project\
**Tags:** aws\
**Created:** [August 25, 2020, 6:01pm UTC](https://forum.ansible.com/t/aws-ec2-inventory-filters/33674 "2020-08-25T18:01:35Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![william.dossett](https://avatars.discourse-cdn.com/v4/letter/w/b782af/32.png) [@william.dossett](https://forum.ansible.com/u/william.dossett)\
**Post date:** [August 25, 2020, 6:01pm UTC](https://forum.ansible.com/t/aws-ec2-inventory-filters/33674/1 "2020-08-25T18:01:35Z")

</div>

Hi, could any kind person show me an example of an AWS inventory filter that filters by the instance private-ip-address?

I have been trying variations of private-ip-address = “x.x.x.x”, ec2.private-ip-address = etc etc all afternoon and I can’t save my source as it says invalid syntax… I am putting {{ }} around these.

Thanks  
Bill

---

<div class="post-metadata">

**Author:** ![william.dossett](https://avatars.discourse-cdn.com/v4/letter/w/b782af/32.png) [@william.dossett](https://forum.ansible.com/u/william.dossett)\
**Post date:** [August 26, 2020, 7:20pm UTC](https://forum.ansible.com/t/aws-ec2-inventory-filters/33674/2 "2020-08-26T19:20:33Z")

</div>

well… I figured out a sort of answer, apparently awx inventory plugins are not equal… you can use expressions in {{}} in vmware, but not in AWS… so in aws, to filter what I wanted I just put

private-ip-address=10.5.162.10

and it pulled just one host… the private-ip-address is directly from aws ec2 describe-instances output, so I can filter on anything in that also, use wildcards, not sure what else. I have much to learn.
