<commit_before>###################################################################################################

resource "aws_lambda_function" "s3_sftp_bridge_lambda" {
  filename         = "${var.lambda_function_package_path}"
  function_name    = "${var.function_prefix}-${var.integration_name}"
  description      = "${var.lambda_description}"
  runtime          = "python2.7"
  role             = "${aws_iam_role.lambda_role.arn}"
  handler          = "s3-sftp-bridge.handler"
  source_code_hash = "${base64sha256(file("${var.lambda_function_package_path}"))}"
  timeout          = 60

  environment {
    variables = {
      SFTP_HOST       = "${var.sftp_host}"
      SFTP_PORT       = "${var.sftp_port}"
      SFTP_USER       = "${var.sftp_user}"
      SFTP_LOCATION   = "${var.sftp_location}"
      SFTP_S3_SSH_KEY = "s3-sftp-bridge-ssh-keys-${var.aws_account_id}/${var.integration_name}/${var.ssh_key_file}"
    }
  }
}

###################################################################################################<commit_msg>Add SQS DLQ QUEUE_NAME env var to Lambda function<commit_after>###################################################################################################

resource "aws_lambda_function" "s3_sftp_bridge_lambda" {
  filename         = "${var.lambda_function_package_path}"
  function_name    = "${var.function_prefix}-${var.integration_name}"
  description      = "${var.lambda_description}"
  runtime          = "python2.7"
  role             = "${aws_iam_role.lambda_role.arn}"
  handler          = "s3-sftp-bridge.handler"
  source_code_hash = "${base64sha256(file("${var.lambda_function_package_path}"))}"
  timeout          = 60

  environment {
    variables = {
      QUEUE_NAME      = "${aws_sqs_queue.dead_letter.name}"
      SFTP_HOST       = "${var.sftp_host}"
      SFTP_PORT       = "${var.sftp_port}"
      SFTP_USER       = "${var.sftp_user}"
      SFTP_LOCATION   = "${var.sftp_location}"
      SFTP_S3_SSH_KEY = "s3-sftp-bridge-ssh-keys-${var.aws_account_id}/${var.integration_name}/${var.ssh_key_file}"
    }
  }
}

###################################################################################################
{'fraction_non_alphanumeric': 0.29945054945054944, 'fraction_numerical': 0.011904761904761904, 'mean_word_length': 3.8233995584988962, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6954108', 'n_tokens_mistral': 690, 'n_tokens_neox': 650, 'n_words': 74}