# Find the list of all the AWS ALB target groups in which instance is registered

**URL:** <https://forum.ansible.com/t/find-the-list-of-all-the-aws-alb-target-groups-in-which-instance-is-registered/27387>\
**Category:** Ansible Project\
**Tags:** aws\
**Created:** [April 26, 2018, 12:59pm UTC](https://forum.ansible.com/t/find-the-list-of-all-the-aws-alb-target-groups-in-which-instance-is-registered/27387 "2018-04-26T12:59:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Arbab\_Nazar1](https://avatars.discourse-cdn.com/v4/letter/a/3e96dc/32.png) [@Arbab\_Nazar1](https://forum.ansible.com/u/Arbab_Nazar1)\
**Post date:** [April 26, 2018, 12:59pm UTC](https://forum.ansible.com/t/find-the-list-of-all-the-aws-alb-target-groups-in-which-instance-is-registered/27387/1 "2018-04-26T12:59:23Z")

</div>

For ELB, if we want to remove the instance from all the elbs, we just need to pass the instance id to the elb\_instance module and again if we want to add the instance back in the same playbook, it give us a magic variable ec2\_elbs, we can iterate over this variable and add back or register the instance to all the elbs which he was registered previously.

I didn’t find any module, which I can use to find the list of the target groups in which the instance is register. can somebody point if know about it.

Thanks in advance
