# AWX installed on AWS- ERROR with aws inventory.

**URL:** <https://forum.ansible.com/t/awx-installed-on-aws-error-with-aws-inventory/26270>\
**Category:** AWX Project\
**Tags:** aws, awx\
**Created:** [December 12, 2017, 10:59pm UTC](https://forum.ansible.com/t/awx-installed-on-aws-error-with-aws-inventory/26270 "2017-12-12T22:59:55Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ravi\_Gavde](https://avatars.discourse-cdn.com/v4/letter/r/278dde/32.png) [@Ravi\_Gavde](https://forum.ansible.com/u/Ravi_Gavde)\
**Post date:** [December 12, 2017, 10:59pm UTC](https://forum.ansible.com/t/awx-installed-on-aws-error-with-aws-inventory/26270/1 "2017-12-12T22:59:55Z")

</div>

2017-12-12 22:45:08,761 INFO awx.main.commands.inventory\_import Updating inventory 3: AWS HorizontalDev 2017-12-12 22:45:08,776 DEBUG awx.main.commands.inventory\_import Using system install of ansible-inventory CLI: /usr/bin/ansible-inventory 2017-12-12 22:45:08,776 INFO awx.main.commands.inventory\_import Reading Ansible inventory source: /usr/lib/python2.7/site-packages/awx/plugins/inventory/ec2.py 2017-12-12 22:45:35,201 ERROR awx.main.commands.inventory\_import [WARNING]: Could not match supplied host pattern, ignoring: all 2017-12-12 22:45:35,201 ERROR awx.main.commands.inventory\_import 2017-12-12 22:45:35,202 INFO awx.main.commands.inventory\_import Processing JSON output… 2017-12-12 22:45:35,202 DEBUG awx.main.commands.inventory\_import Loaded group: all 2017-12-12 22:45:35,202 DEBUG awx.main.commands.inventory\_import Finished loading from source: /usr/lib/python2.7/site-packages/awx/plugins/inventory/ec2.py 2017-12-12 22:45:35,202 INFO awx.main.commands.inventory\_import Loaded 0 groups, 0 hosts 2017-12-12 22:45:35,213 INFO awx.main.commands.inventory\_import Inventory variables unmodified 2017-12-12 22:45:35,220 DEBUG awx.main.models.inventory Going to update inventory computed fields 2017-12-12 22:45:35,284 DEBUG awx.main.models.inventory Finished updating inventory computed fields 2017-12-12 22:45:35,284 INFO awx.main.commands.inventory\_import Inventory import completed for AWS in 26.6s

Ec2 filters provided are not being used by AWX. Its almost a week, trying to get it run. Please share your thoughts

---

<div class="post-metadata">

**Author:** ![matburt](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/matburt/32/3612_2.png) [@matburt](https://forum.ansible.com/u/matburt)\
**Post date:** [December 13, 2017, 6:44pm UTC](https://forum.ansible.com/t/awx-installed-on-aws-error-with-aws-inventory/26270/2 "2017-12-13T18:44:43Z")

</div>

How have you set up your inventory source?

---

<div class="post-metadata">

**Author:** ![Ravi\_Gavde](https://avatars.discourse-cdn.com/v4/letter/r/278dde/32.png) [@Ravi\_Gavde](https://forum.ansible.com/u/Ravi_Gavde)\
**Post date:** [December 13, 2017, 6:47pm UTC](https://forum.ansible.com/t/awx-installed-on-aws-error-with-aws-inventory/26270/3 "2017-12-13T18:47:30Z")

</div>

Yes, I have IAM user ACCESS & secret key, using amazon EC@ as source. Pls refer the PIC too

> **(attachments)**
>
> ![source.JPG](https://us1.discourse-cdn.com/ansible/original/2X/c/cfc700a9f9d8e5d2eb2b66aa5a9b36b6bff0d644.jpeg)

---

<div class="post-metadata">

**Author:** ![matburt](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/matburt/32/3612_2.png) [@matburt](https://forum.ansible.com/u/matburt)\
**Post date:** [December 13, 2017, 6:56pm UTC](https://forum.ansible.com/t/awx-installed-on-aws-error-with-aws-inventory/26270/4 "2017-12-13T18:56:53Z")

</div>

I would verify that credential can see the hosts you expect to be there.

---

<div class="post-metadata">

**Author:** ![Ravi\_Gavde](https://avatars.discourse-cdn.com/v4/letter/r/278dde/32.png) [@Ravi\_Gavde](https://forum.ansible.com/u/Ravi_Gavde)\
**Post date:** [December 13, 2017, 7:00pm UTC](https://forum.ansible.com/t/awx-installed-on-aws-error-with-aws-inventory/26270/5 "2017-12-13T19:00:13Z")

</div>

Yes, I have inventory source setup done. refer pic too

> **(attachments)**
>
> ![invSource.JPG](https://us1.discourse-cdn.com/ansible/original/2X/8/8354fa1cb8b3680f41eef1eddee9bdec919ae7ca.jpeg)

---

<div class="post-metadata">

**Author:** ![Ravi\_Gavde](https://avatars.discourse-cdn.com/v4/letter/r/278dde/32.png) [@Ravi\_Gavde](https://forum.ansible.com/u/Ravi_Gavde)\
**Post date:** [December 13, 2017, 7:54pm UTC](https://forum.ansible.com/t/awx-installed-on-aws-error-with-aws-inventory/26270/6 "2017-12-13T19:54:01Z")

</div>

I have access to ec2, Autoscalling ,S3 etc except for elastic search. So thats the issue then, I thought I shd be able to see ec2 insatnce as I tried adding tag filter too

---

<div class="post-metadata">

**Author:** ![Ravi\_Gavde](https://avatars.discourse-cdn.com/v4/letter/r/278dde/32.png) [@Ravi\_Gavde](https://forum.ansible.com/u/Ravi_Gavde)\
**Post date:** [December 13, 2017, 8:21pm UTC](https://forum.ansible.com/t/awx-installed-on-aws-error-with-aws-inventory/26270/7 "2017-12-13T20:21:21Z")

</div>

I am now using IAM role attached to the ec2 where AWX is running. When I run docker exec 0de4d8a3f2a2 python2 /usr/lib/python2.7/site-packages/awx/plugins/inventory/ec2.py  
in the awx\_task container. I am getting all the data related to RDS and cache in format:  
{  
“Multiple”: [  
[//xxxxx.y9ryfm.cfg.use1.cache.amazonaws.com](https://xxxxx.y9ryfm.cfg.use1.cache.amazonaws.com)

],

“\_meta”: {  
“hostvars”: {

…  
so on, all details on RDS.

When I try through the WEBUI, I get :  
2017-12-13 20:10:01,187 INFO awx.main.commands.inventory\_import Updating inventory 3: AWS HorizontalDev 2017-12-13 20:10:01,203 DEBUG awx.main.commands.inventory\_import Using system install of ansible-inventory CLI: /usr/bin/ansible-inventory 2017-12-13 20:10:01,203 INFO awx.main.commands.inventory\_import Reading Ansible inventory source: /usr/lib/python2.7/site-packages/awx/plugins/inventory/ec2.py 2017-12-13 20:10:02,912 ERROR awx.main.commands.inventory\_import [WARNING]: Could not match supplied host pattern, ignoring: all 2017-12-13 20:10:02,913 ERROR awx.main.commands.inventory\_import 2017-12-13 20:10:02,913 INFO awx.main.commands.inventory\_import Processing JSON output… 2017-12-13 20:10:02,913 DEBUG awx.main.commands.inventory\_import Loaded group: all 2017-12-13 20:10:02,913 DEBUG awx.main.commands.inventory\_import Finished loading from source: /usr/lib/python2.7/site-packages/awx/plugins/inventory/ec2.py 2017-12-13 20:10:02,913 INFO awx.main.commands.inventory\_import Loaded 0 groups, 0 hosts 2017-12-13 20:10:02,923 INFO awx.main.commands.inventory\_import Inventory variables unmodified 2017-12-13 20:10:02,929 DEBUG awx.main.models.inventory Going to update inventory computed fields 2017-12-13 20:10:02,991 DEBUG awx.main.models.inventory Finished updating inventory computed fields 2017-12-13 20:10:02,991 INFO awx.main.commands.inventory\_import Inventory import completed for AWS in 1.8s

In Inventory , I have configured only source now and not groups & hosts.

Can you pls tell me what am I missing?

thanks for your support:)

> **(attachments)**
>
> ![newdata.JPG](https://us1.discourse-cdn.com/ansible/original/2X/a/a1b1e66c7ba12424d09bd4712be9c96e77c1aa97.jpeg)

---

<div class="post-metadata">

**Author:** ![Ravi\_Gavde](https://avatars.discourse-cdn.com/v4/letter/r/278dde/32.png) [@Ravi\_Gavde](https://forum.ansible.com/u/Ravi_Gavde)\
**Post date:** [December 13, 2017, 8:36pm UTC](https://forum.ansible.com/t/awx-installed-on-aws-error-with-aws-inventory/26270/8 "2017-12-13T20:36:31Z")

</div>

there is no ec2.ini in /usr/lib/python2.7/site-packages/awx/plugins/inventory/ where ec2.py is called in the awx\_task container. I added there manually to run ec2.py script from docker thru cli as it was giving this error in absence of ec2.ini:

---

<div class="post-metadata">

**Author:** ![Ravi\_Gavde](https://avatars.discourse-cdn.com/v4/letter/r/278dde/32.png) [@Ravi\_Gavde](https://forum.ansible.com/u/Ravi_Gavde)\
**Post date:** [December 13, 2017, 8:37pm UTC](https://forum.ansible.com/t/awx-installed-on-aws-error-with-aws-inventory/26270/9 "2017-12-13T20:37:46Z")

</div>

Traceback (most recent call last):  
File “/usr/lib/python2.7/site-packages/awx/plugins/inventory/ec2.py”, line 1573, in   
Ec2Inventory()  
File “/usr/lib/python2.7/site-packages/awx/plugins/inventory/ec2.py”, line 180, in **init**  
self.read\_settings()  
File “/usr/lib/python2.7/site-packages/awx/plugins/inventory/ec2.py”, line 251, in read\_settings  
configRegions = config.get(‘ec2’, ‘regions’)  
File “/usr/lib64/python2.7/ConfigParser.py”, line 607, in get  
raise NoSectionError(section)  
ConfigParser.NoSectionError: No section: ‘ec2’
