# Attach an IAM role to existing EC2 instances

**URL:** <https://forum.ansible.com/t/attach-an-iam-role-to-existing-ec2-instances/24936>\
**Category:** Ansible Project\
**Created:** [July 9, 2017, 6:15am UTC](https://forum.ansible.com/t/attach-an-iam-role-to-existing-ec2-instances/24936 "2017-07-09T06:15:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bond](https://avatars.discourse-cdn.com/v4/letter/b/9dc877/32.png) [@Bond](https://forum.ansible.com/u/Bond)\
**Post date:** [July 9, 2017, 6:15am UTC](https://forum.ansible.com/t/attach-an-iam-role-to-existing-ec2-instances/24936/1 "2017-07-09T06:15:02Z")

</div>

Hi,  
I am trying to attach and IAM role to a set of existing EC2 instances based on the Tag value. Is there a module readily available in Ansible now? Any suggestions?
