code: def key_exists(key_id, region=None, key=None, keyid=None, profile=None):
      '''
      Check for the existence of a key.
  
      CLI example::
  
          salt myminion boto_kms.key_exists 'alias/mykey'
      '''
      conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
  
      r = {}
      try:
          key = conn.describe_key(key_id)
          # TODO: add to context cache
          r['result'] = True
      except boto.exception.BotoServerError as e:
          if isinstance(e, boto.kms.exceptions.NotFoundException):
              r['result'] = False
              return r
          r['error'] = __utils__['boto.get_error'](e)
      return f key_exists(key_id, region=None, key=None, keyid=None, profile=None):
      '''
      Check for the existence of a key.
  
      CLI example::
  
          salt myminion boto_kms.key_exists 'alias/mykey'
      '''
      conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
  
      r = {}
      try:
          key = conn.describe_key(key_id)
          # TODO: add to context cache
          r['result'] = True
      except boto.exception.BotoServerError as e:
          if isinstance(e, boto.kms.exceptions.NotFoundException):
              r['result'] = False
              return r
          r['error'] = __utils__['boto.get_error'](e)
      return r
docs: Check for the existence of a key.
  
      CLI example::
  
          salt myminion boto_kms.key_exists 'alias/mykey'