docs: def list_attached_role_policies(role_name, path_prefix=None, entity_filter=None,
                    region=None, key=None, keyid=None, profile=None):
      '''
      List entities attached to the given role.
  
      CLI Example:
  
      .. code-block:: bash
  
          salt myminion boto_iam.list_entities_for_policy mypolicy
      '''
      conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
  
      params = {'RoleName': role_name}
      if path_prefix is not None:
          params['PathPrefix'] = path_prefix
  
      policies = []
      try:
          # Using conn.get_response is a bit of a hack, but it avoids having to
          # rewrite this whole module based on boto3
          for ret in __utils__['boto.paged_call'](conn.get_response, 'ListAttachedRolePolicies', params, list_marker='AttachedPolicies'):
              policies.extend(ret.get('list_attached_role_policies_response', {}).get('list_attached_role_policies_result', {}
                                     ).get('attached_policies', []))
          return policies
      except boto.exception.BotoServerError as e:
          log.debug(e)
          log.error('Failed to list attached policies for IAM role %s.', role_name)
          return []