# Error running ec2.py script

**URL:** <https://forum.ansible.com/t/error-running-ec2-py-script/16590>\
**Category:** Ansible Project\
**Tags:** ubuntu, aws\
**Created:** [October 23, 2014, 3:32pm UTC](https://forum.ansible.com/t/error-running-ec2-py-script/16590 "2014-10-23T15:32:36Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bruce\_Bundy](https://avatars.discourse-cdn.com/v4/letter/b/91b2a8/32.png) [@Bruce\_Bundy](https://forum.ansible.com/u/Bruce_Bundy)\
**Post date:** [October 23, 2014, 3:32pm UTC](https://forum.ansible.com/t/error-running-ec2-py-script/16590/1 "2014-10-23T15:32:36Z")

</div>

I have a freshly installed Ubuntu 14.04 LTS instance running ansible 1.5.4 and python 2.7.6  
In general my ansible playbooks are running normally, using modules such as apt, gem, pip, authorized\_key, user, etc.

Now I am trying to use AWS dynamic inventory features. I fetched ec2.py using

wget [https://raw.github.com/ansible/ansible/devel/plugins/inventory/ec2.py](https://raw.github.com/ansible/ansible/devel/plugins/inventory/ec2.py)

and ec2.ini using

wget [https://raw.github.com/ansible/ansible/devel/plugins/inventory/ec2.ini](https://raw.github.com/ansible/ansible/devel/plugins/inventory/ec2.ini)

but have not made any mods to either file.

When I try the test command provided, I receive the following error:

---

<div class="post-metadata">

**Author:** ![Michael\_Peters](https://avatars.discourse-cdn.com/v4/letter/m/c2a13f/32.png) [@Michael\_Peters](https://forum.ansible.com/u/Michael_Peters)\
**Post date:** [October 23, 2014, 3:53pm UTC](https://forum.ansible.com/t/error-running-ec2-py-script/16590/2 "2014-10-23T15:53:04Z")

</div>

Try running the dynamic inventory by itself to see what output is generated.

&nbsp;&nbsp;./ec2.py

---

<div class="post-metadata">

**Author:** ![Bruce\_Bundy](https://avatars.discourse-cdn.com/v4/letter/b/91b2a8/32.png) [@Bruce\_Bundy](https://forum.ansible.com/u/Bruce_Bundy)\
**Post date:** [October 23, 2014, 4:28pm UTC](https://forum.ansible.com/t/error-running-ec2-py-script/16590/3 "2014-10-23T16:28:35Z")

</div>

Thanks Michael. That enabled me to debug the problem. Two things: I needed to “pip install boto” and “export EC2\_INI\_PATH=/etc/ansible/ec2.ini”.  
🙂 works now!  
-Bruce

---

<div class="post-metadata">

**Author:** ![Christian\_Laguerre](https://avatars.discourse-cdn.com/v4/letter/c/3bc359/32.png) [@Christian\_Laguerre](https://forum.ansible.com/u/Christian_Laguerre)\
**Post date:** [October 23, 2014, 6:48pm UTC](https://forum.ansible.com/t/error-running-ec2-py-script/16590/4 "2014-10-23T18:48:58Z")

</div>

Bruce,

You may want to run a more recent version Ansible. There a a lot of parameters need 1.6, and even the current release 1.7.2 is starting to fall behind for AWS stuff. For instance, spinning up a Encrypted ESB volume requires 1.8. Here’s a link to where this is discussed. [http://docs.ansible.com/intro\_installation.html](http://docs.ansible.com/intro_installation.html)

-Christian

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan1](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@Michael\_DeHaan1](https://forum.ansible.com/u/Michael_DeHaan1)\
**Post date:** [October 24, 2014, 1:30pm UTC](https://forum.ansible.com/t/error-running-ec2-py-script/16590/5 "2014-10-24T13:30:12Z")

</div>

No closing quotation has little to do with AWS parameter usage, but error handling is greatly improved in numerous cases in the 1.7.X series.
