From 015e2863dc6917b8ad234dd32e11562159a98f67 Mon Sep 17 00:00:00 2001 From: Daniel Roth Date: Wed, 4 Mar 2026 14:47:25 +0000 Subject: [PATCH] address JTK PR comments --- .github/workflows/deploy_terraform.yml | 1 - infrastructure/terraform/lambda/_template/main.tf | 2 ++ infrastructure/terraform/lambda/_template/variables.tf | 5 +++++ infrastructure/terraform/lambda/categorisation/variables.tf | 5 +++++ 4 files changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy_terraform.yml b/.github/workflows/deploy_terraform.yml index 8c768965..4c9ce44a 100644 --- a/.github/workflows/deploy_terraform.yml +++ b/.github/workflows/deploy_terraform.yml @@ -193,7 +193,6 @@ jobs: lambda_name: condition-etl lambda_path: infrastructure/terraform/lambda/condition-etl stage: ${{ needs.determine_stage.outputs.stage }} - batch_size: 2 ecr_repo: condition-etl-${{ needs.determine_stage.outputs.stage }} image_digest: ${{ needs.condition_etl_image.outputs.image_digest }} terraform_apply: ${{ needs.determine_stage.outputs.terraform_apply }} diff --git a/infrastructure/terraform/lambda/_template/main.tf b/infrastructure/terraform/lambda/_template/main.tf index 89e6c4c1..c6015ea1 100644 --- a/infrastructure/terraform/lambda/_template/main.tf +++ b/infrastructure/terraform/lambda/_template/main.tf @@ -36,6 +36,8 @@ module "lambda" { # Optional: Set maximum_concurrency to limit concurrent SQS-triggered invocations (2-1000) maximum_concurrency = var.maximum_concurrency + batch_size = var.batch_size + environment = { STAGE = var.stage LOG_LEVEL = "info" diff --git a/infrastructure/terraform/lambda/_template/variables.tf b/infrastructure/terraform/lambda/_template/variables.tf index e0061321..e7646811 100644 --- a/infrastructure/terraform/lambda/_template/variables.tf +++ b/infrastructure/terraform/lambda/_template/variables.tf @@ -23,6 +23,11 @@ variable "maximum_concurrency" { description = "Maximum number of concurrent Lambda invocations from SQS (2-1000). null = no limit." } +variable "batch_size" { + type = number + default = 1 +} + locals { image_uri = "${var.ecr_repo_url}@${var.image_digest}" } diff --git a/infrastructure/terraform/lambda/categorisation/variables.tf b/infrastructure/terraform/lambda/categorisation/variables.tf index 347964de..23a78875 100644 --- a/infrastructure/terraform/lambda/categorisation/variables.tf +++ b/infrastructure/terraform/lambda/categorisation/variables.tf @@ -23,6 +23,11 @@ variable "maximum_concurrency" { description = "Maximum number of concurrent Lambda invocations from SQS (2-1000). null = no limit." } +variable "batch_size" { + type = number + default = 2 +} + locals { image_uri = "${var.ecr_repo_url}@${var.image_digest}" }