def delete_role_policy(role_name, policy_name, region=None, key=None, keyid=None, profile=None):
 conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
 _policy = get_role_policy(role_name, policy_name, region, key, keyid, profile)
 if (not _policy):
  return True
 try:
  conn.delete_role_policy(role_name, policy_name)
  msg = 'Successfully deleted {0} policy for role {1}.'
  log.info(msg.format(policy_name, role_name))
  return True
 except boto.exception.BotoServerError as e:
  log.debug(e)
  msg = 'Failed to delete {0} policy for role {1}.'
  log.error(msg.format(policy_name, role_name))
  return False

def delete_role_policy ( role_name , policy_name , region = None , key = None , keyid = None , profile = None ) : conn = _get_conn ( region = region , key = key , keyid = keyid , profile = profile ) _policy = get_role_policy ( role_name , policy_name , region , key , keyid , profile ) if ( not _policy ) : return True try : conn . delete_role_policy ( role_name , policy_name ) msg = 'Successfully deleted {0} policy for role {1}.' log . info ( msg . format ( policy_name , role_name ) ) return True except boto . exception . BotoServerError as e : log . debug ( e ) msg = 'Failed to delete {0} policy for role {1}.' log . error ( msg . format ( policy_name , role_name ) ) return False
delete a role policy .