def policy_version_exists(policy_name, version_id, region=None, key=None, keyid=None, profile=None):
 conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
 policy_arn = _get_policy_arn(policy_name, region, key, keyid, profile)
 try:
  conn.get_policy_version(policy_arn, version_id)
  return True
 except boto.exception.BotoServerError:
  return False

def policy_version_exists ( policy_name , version_id , region = None , key = None , keyid = None , profile = None ) : conn = _get_conn ( region = region , key = key , keyid = keyid , profile = profile ) policy_arn = _get_policy_arn ( policy_name , region , key , keyid , profile ) try : conn . get_policy_version ( policy_arn , version_id ) return True except boto . exception . BotoServerError : return False
given a policy name and version id .