:doc:`InstanceProfile <index>` / Action / remove_role

***********
remove_role
***********



.. py:method:: IAM.InstanceProfile.remove_role(**kwargs)

  

  Removes the specified IAM role from the specified Amazon EC2 instance profile.

   

  .. warning::

     

    Make sure that you do not have any Amazon EC2 instances running with the role you are about to remove from the instance profile. Removing a role from an instance profile that is associated with a running instance might break any applications running on the instance.

     

   

  For more information about roles, see `IAM roles <https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html>`__ in the *IAM User Guide*. For more information about instance profiles, see `Using instance profiles <https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_switch-role-ec2_instance-profiles.html>`__ in the *IAM User Guide*.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/RemoveRoleFromInstanceProfile>`_  


  **Request Syntax**
  ::

    response = instance_profile.remove_role(
        RoleName='string'
    )
    
  :type RoleName: string
  :param RoleName: **[REQUIRED]** 

    The name of the role to remove.

     

    This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@-

    

  
  
  :returns: None