# Ansible to assign an IAM role to an existing instance

**URL:** <https://forum.ansible.com/t/ansible-to-assign-an-iam-role-to-an-existing-instance/24928>\
**Category:** Ansible Project\
**Created:** [July 7, 2017, 6:42pm UTC](https://forum.ansible.com/t/ansible-to-assign-an-iam-role-to-an-existing-instance/24928 "2017-07-07T18:42:56Z")\
**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 7, 2017, 6:42pm UTC](https://forum.ansible.com/t/ansible-to-assign-an-iam-role-to-an-existing-instance/24928/1 "2017-07-07T18:42:56Z")

</div>

Hi,

I am trying to assign an IAM role to a bunch of existing EC2 instances using Ansible modules. I couldn’t find an appropriate module for that same and wasn’t sure if that is possible since this feature came out recently. Any suggestions?
