Merge pull request #1018 from Hestia-Homes/feature/pashub-to-ara

PasHub to Ara: Limit lambda reserved concurrency to 1
This commit is contained in:
Daniel Roth 2026-04-21 09:59:45 +01:00 committed by GitHub
commit 561d4632fc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 32 additions and 1 deletions

View file

@ -36,6 +36,8 @@ module "lambda" {
# Optional: Set maximum_concurrency to limit concurrent SQS-triggered invocations (2-1000)
maximum_concurrency = var.maximum_concurrency
reserved_concurrent_executions = var.reserved_concurrent_executions
batch_size = var.batch_size
environment = {

View file

@ -23,6 +23,12 @@ variable "maximum_concurrency" {
description = "Maximum number of concurrent Lambda invocations from SQS (2-1000). null = no limit."
}
variable "reserved_concurrent_executions" {
type = number
default = -1
description = "Reserved concurrency for the Lambda function. -1 = unreserved. 1+ = hard limit across all triggers."
}
variable "batch_size" {
type = number
default = 1

View file

@ -26,6 +26,8 @@ module "lambda" {
# Optional: Set maximum_concurrency to limit concurrent SQS-triggered invocations (2-1000)
maximum_concurrency = var.maximum_concurrency
reserved_concurrent_executions = var.reserved_concurrent_executions
batch_size = var.batch_size
environment = {

View file

@ -23,6 +23,12 @@ variable "maximum_concurrency" {
description = "Maximum number of concurrent Lambda invocations from SQS (2-1000). null = no limit."
}
variable "reserved_concurrent_executions" {
type = number
default = 1
description = "Reserved concurrency. Defaults to 1 to prevent concurrent Playwright browser collisions."
}
variable "batch_size" {
type = number
default = 1

View file

@ -9,6 +9,8 @@ resource "aws_lambda_function" "this" {
memory_size = var.memory_size
publish = true
reserved_concurrent_executions = var.reserved_concurrent_executions
environment {
variables = var.environment
}

View file

@ -16,3 +16,9 @@ variable "environment" {
type = map(string)
default = {}
}
variable "reserved_concurrent_executions" {
type = number
default = -1
description = "Reserved concurrency for the Lambda function. -1 = unreserved (default). 0 = throttle all. 1+ = hard limit."
}

View file

@ -31,7 +31,8 @@ module "lambda" {
timeout = var.timeout
memory_size = var.memory_size
environment = var.environment
environment = var.environment
reserved_concurrent_executions = var.reserved_concurrent_executions
}
############################################

View file

@ -40,3 +40,9 @@ variable "maximum_concurrency" {
default = null
description = "Maximum number of concurrent Lambda invocations from SQS. null = no limit."
}
variable "reserved_concurrent_executions" {
type = number
default = -1
description = "Reserved concurrency for the Lambda function. -1 = unreserved. 1 = single-threaded."
}