<commit_before># Lambda for tagging EC2 instances with ECS cluster/container instance id

module "lambda_ecs_ec2_instance_tagger" {
  source = "git::https://github.com/wellcometrust/terraform.git//lambda?ref=v1.0.0"

  name        = "ecs_ec2_instance_tagger"
  description = "Tag an EC2 instance with ECS cluster/container instance id"
  timeout     = 10

  environment_variables = {
    BUCKET_NAME = "${var.infra_bucket}"
    OBJECT_PATH = "tmp/ecs_ec2_instance_tagger"
  }

  alarm_topic_arn = "${var.lambda_error_alarm_arn}"
  s3_bucket       = "${var.infra_bucket}"
  s3_key          = "lambdas/shared_infra/ecs_ec2_instance_tagger.zip"
}

module "trigger_ecs_ec2_instance_tagger" {
  source                  = "git::https://github.com/wellcometrust/terraform.git//lambda/trigger_cloudwatch?ref=v1.0.0"
  lambda_function_name    = "${module.lambda_ecs_ec2_instance_tagger.function_name}"
  lambda_function_arn     = "${module.lambda_ecs_ec2_instance_tagger.arn}"
  cloudwatch_trigger_arn  = "${var.ecs_container_instance_state_change_arn}"
  cloudwatch_trigger_name = "${var.ecs_container_instance_state_change_name}"
  custom_input            = false
}
<commit_msg>Bump the timeout on the ECS/EC2 instance tagger<commit_after># Lambda for tagging EC2 instances with ECS cluster/container instance id

module "lambda_ecs_ec2_instance_tagger" {
  source = "git::https://github.com/wellcometrust/terraform.git//lambda?ref=v1.0.0"

  name        = "ecs_ec2_instance_tagger"
  description = "Tag an EC2 instance with ECS cluster/container instance id"
  timeout     = 25

  environment_variables = {
    BUCKET_NAME = "${var.infra_bucket}"
    OBJECT_PATH = "tmp/ecs_ec2_instance_tagger"
  }

  alarm_topic_arn = "${var.lambda_error_alarm_arn}"
  s3_bucket       = "${var.infra_bucket}"
  s3_key          = "lambdas/shared_infra/ecs_ec2_instance_tagger.zip"
}

module "trigger_ecs_ec2_instance_tagger" {
  source                  = "git::https://github.com/wellcometrust/terraform.git//lambda/trigger_cloudwatch?ref=v1.0.0"
  lambda_function_name    = "${module.lambda_ecs_ec2_instance_tagger.function_name}"
  lambda_function_arn     = "${module.lambda_ecs_ec2_instance_tagger.arn}"
  cloudwatch_trigger_arn  = "${var.ecs_container_instance_state_change_arn}"
  cloudwatch_trigger_name = "${var.ecs_container_instance_state_change_name}"
  custom_input            = false
}

{'fraction_non_alphanumeric': 0.10395622895622895, 'fraction_numerical': 0.016414141414141416, 'mean_word_length': 4.3656884875846504, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, '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': '7310873', 'n_tokens_mistral': 846, 'n_tokens_neox': 831, 'n_words': 115}