# Dynamic inventory doesn't include private EC2 instances

**URL:** <https://forum.ansible.com/t/dynamic-inventory-doesnt-include-private-ec2-instances/17807>\
**Category:** Ansible Project\
**Tags:** aws\
**Created:** [March 22, 2015, 7:04pm UTC](https://forum.ansible.com/t/dynamic-inventory-doesnt-include-private-ec2-instances/17807 "2015-03-22T19:04:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Brenda\_Bell](https://avatars.discourse-cdn.com/v4/letter/b/6bbea6/32.png) [@Brenda\_Bell](https://forum.ansible.com/u/Brenda_Bell)\
**Post date:** [March 22, 2015, 7:04pm UTC](https://forum.ansible.com/t/dynamic-inventory-doesnt-include-private-ec2-instances/17807/1 "2015-03-22T19:04:56Z")

</div>

I’ve refreshed my cache using ec2.py --refresh-cache.

When I run ec2.py --list, it only lists the public instances. My AWS infrastructure has three public servers (one being a jump server) and several private ones. I was hoping to use static groups to be able to reference my servers by data (i.e., tag\_type\_data, tag\_type\_mgmt, etc.). But the dynamic inventory is incomplete.

Is there some configuration switch I need to set to see all of my instances?

---

<div class="post-metadata">

**Author:** ![WhileLoop](https://avatars.discourse-cdn.com/v4/letter/w/bc8723/32.png) [@WhileLoop](https://forum.ansible.com/u/WhileLoop)\
**Post date:** [March 23, 2015, 1:40am UTC](https://forum.ansible.com/t/dynamic-inventory-doesnt-include-private-ec2-instances/17807/2 "2015-03-23T01:40:34Z")

</div>

Try setting ‘vpc\_destination\_variable = private\_ip\_address’ in ec2.ini
