  def DetachInstanceProfileFromRole(self, role_name: str, profile_name: str) \
    -> None:
    """Detach a role from an instance profile.

    Args:
      role_name (str): The name of the role.
      profile_name (str): The name of the instance profile.
    """
    logger.info('Detaching role {0:s} from instance profile {1:s}'
      .format(role_name, profile_name))
    try:
      self.client.remove_role_from_instance_profile(
        InstanceProfileName=profile_name, RoleName=role_name)
    except self.client.exceptions.NoSuchEntityException:
      pass
Detach a role from an instance profile.

Args:
role_name (str): The name of the role.
profile_name (str): The name of the instance profile.
libcloudforensics/providers/aws/internal/iam.py