# How can i gather ec2 elb facts using AWX/Ansible Tower?

**URL:** <https://forum.ansible.com/t/how-can-i-gather-ec2-elb-facts-using-awx-ansible-tower/28606>\
**Category:** Ansible Project\
**Tags:** aws, awx\
**Created:** [September 19, 2018, 2:48pm UTC](https://forum.ansible.com/t/how-can-i-gather-ec2-elb-facts-using-awx-ansible-tower/28606 "2018-09-19T14:48:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ankit2](https://avatars.discourse-cdn.com/v4/letter/a/ea5d25/32.png) [@Ankit2](https://forum.ansible.com/u/Ankit2)\
**Post date:** [September 19, 2018, 2:48pm UTC](https://forum.ansible.com/t/how-can-i-gather-ec2-elb-facts-using-awx-ansible-tower/28606/1 "2018-09-19T14:48:54Z")

</div>

I have been following the ec2\_elb\_facts module and tried using the below example but in the debug logs i can see the aws values are completely getting ignored. How can i get this working?

```auto
- hosts: localhost
  vars:
    aws_access_key: accesskey
    aws_secret_key: secretkey
    ec2_region: us-east1
  gather_facts: true
  tasks:
    # Gather facts about all ELBs
    - action:
        module: ec2_elb_facts
      register: elb_facts

    - action:
        module: debug
        msg: "{{ item.dns_name }}"
      with_items: "{{ elb_facts.elbs }}"

```

Also, in tower how can i make sure these keys are used from encrypted file?
