# ec2.py runs, returns empty list - on ONE account

**URL:** <https://forum.ansible.com/t/ec2-py-runs-returns-empty-list-on-one-account/27205>\
**Category:** Ansible Project\
**Tags:** aws\
**Created:** [April 6, 2018, 10:34am UTC](https://forum.ansible.com/t/ec2-py-runs-returns-empty-list-on-one-account/27205 "2018-04-06T10:34:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Karl\_Auer](https://avatars.discourse-cdn.com/v4/letter/k/cc9497/32.png) [@Karl\_Auer](https://forum.ansible.com/u/Karl_Auer)\
**Post date:** [April 6, 2018, 10:34am UTC](https://forum.ansible.com/t/ec2-py-runs-returns-empty-list-on-one-account/27205/1 "2018-04-06T10:34:46Z")

</div>

If I run ec2.py against any of four different AWS accounts, it returns a list of instances etc.

On one AWS account, it returns an empty list. It doesn’t issue error messages, or take a particularly long to time to run, or take a particularly short time to run either.

Using the same credentials with the same accounts, Ansible playbooks using modules like ec2\_group, ec2\_instance etc work fine on all five accounts.

I’m running ec2.py directly, Like this:

kauer@kt:~/dev/ansible$ scripts/ec2.py --list --refresh-cache  
{  
“\_meta”: {  
“hostvars”: {}  
}  
}

All of these accounts, including the one where it returns an empty list, have plenty of resources in them; an empty list is definitely wrong.

We set up a new user in the account, with admin access; when run with those credentials, it still didn’t work.

It is a subordinate account, but so are several of the other five. We created a whole new subordinate account under the same root AWS account, created a new IAM user in the new account, with admin access, spun up a VM - and it didn’t work for that user either.

I’m very new to Ansible, and I am mystified as to what is different about this one account (or the IAM user credentials) that could “achieve” this result.

Any clues greatly appreciated.

Regards, K.
