data "terraform_remote_state" "shared" {
  backend = "s3"
  config = {
    bucket = "assessment-model-terraform-state"
    key = "env:/${var.stage}/terraform.tfstate"
    region = "eu-west-2"
  }
}

module "lambda" {
  source = "../../modules/lambda_with_sqs"

  name  = "ecmk_to_ara" #"address2uprn" for example
  stage = var.stage

  image_uri = local.image_uri

  # 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"
  }
}
