docstr: Encrypts the given plaintext data using AWS KMS
  
  See:
    https://docs.aws.amazon.com/kms/latest/APIReference/API_Encrypt.html
  
  Args:
      plaintext_data (str): The raw, unencrypted data to be encrypted
      region (str): AWS region
      key_alias (str): KMS Key Alias
  
  Returns:
      string: The encrypted ciphertext
  
  Raises:
      ClientError
docstr_tok: ["Encrypts","the","given","plaintext","data","using","AWS","KMS","See",":","https",":","\/\/docs.aws.amazon.com\/kms\/latest\/APIReference\/API_Encrypt.html","Args",":","plaintext_data","(","str",")",":","The","raw",",","unencrypted","data","to","be","encrypted","region","(","str",")",":","AWS","region","key_alias","(","str",")",":","KMS","Key","Alias","Returns",":","string",":","The","encrypted","ciphertext","Raises",":","ClientError"]
code: def encrypt(plaintext_data, region, key_alias):
      """Encrypts the given plaintext data using AWS KMS
  
      See:
        https://docs.aws.amazon.com/kms/latest/APIReference/API_Encrypt.html
  
      Args:
          plaintext_data (str): The raw, unencrypted data to be encrypted
          region (str): AWS region
          key_alias (str): KMS Key Alias
  
      Returns:
          string: The encrypted ciphertext
  
      Raises:
          ClientError
      """
      try:
          if not key_alias.startswith("alias/"):
              key_alias = "alias/{}".format(key_alias)
          client = boto3.client(
              "kms", config=default_config(region=region)
          )
          response = client.encrypt(
              KeyId=key_alias, Plaintext=plaintext_data
          )
          return response["CiphertextBlob"]
      except ClientError:
          LOGGER.error("An error occurred during KMS encryption")
          raise
  
file_path: streamalert/streamalert/shared/helpers/aws_api_client.py
imports: import json
  import boto3
  from botocore.exceptions import ClientError
  from streamalert.shared.helpers.boto import default_config
  from streamalert.shared.logger import get_logger
label_desc: Use image node_id 1 for calling the AwsKms obj's underlying member method code with example usage: obj.encrypt(plaintext_data, region, key_alias) and returns: response