From 5bf29554d8f1588f1b3e3019a66db9249bbf51c8 Mon Sep 17 00:00:00 2001 From: Quetzalli Date: Thu, 23 Jul 2026 15:42:22 +0200 Subject: [PATCH] DOC-303: Document concurrent SQS event source mapping pollers Mark SQS Standard ScalingConfig as implemented in the Lambda Behaviour Coverage table now that MaximumConcurrency caps concurrent pollers, and document the new LAMBDA_EVENT_SOURCE_MAPPING_SQS_POLLER_COUNT configuration variable. --- src/content/docs/aws/customization/configuration-options.md | 1 + src/content/docs/aws/services/lambda.mdx | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/content/docs/aws/customization/configuration-options.md b/src/content/docs/aws/customization/configuration-options.md index 34d85acb..bf641a97 100644 --- a/src/content/docs/aws/customization/configuration-options.md +++ b/src/content/docs/aws/customization/configuration-options.md @@ -273,6 +273,7 @@ Please consult the [migration guide](/aws/services/lambda#migrating-to-lambda-v2 | `LAMBDA_DOCKER_FLAGS` | `-e KEY=VALUE`, `-v host:container`, `-p host:container`, `--add-host domain:ip` | Additional flags passed to Docker `run`\|`create` commands. Supports environment variables (also with `--env-file`, but the file has to be mounted into the LocalStack container), ports, volume mounts, extra hosts, networks, DNS servers, labels, ulimits, user, platform, and privileged mode. The `--env-file` argument for Docker `run` and Docker Compose have different feature sets. To provide both, we support the `--env-file` for environment files with the docker run syntax, while `--compose-env-file` supports the full docker compose features, like placeholders with `${}`, replacing quotes, etc. | | `LAMBDA_DOCKER_NETWORK` | `bridge` (Docker default) | [Docker network driver](https://docs.docker.com/network/) for the Lambda and ECS containers. Needs to be set to the network the LocalStack container is connected to. Limitation: `host` mode currently not supported. | | `LAMBDA_DOWNLOAD_AWS_LAYERS` | `1` (default, pro) | Whether to download public Lambda layers from AWS through a LocalStack proxy when creating or updating functions. | +| `LAMBDA_EVENT_SOURCE_MAPPING_SQS_POLLER_COUNT` | `5` (default) | Number of concurrent pollers spawned per SQS event source mapping for standard queues, each running in its own thread. Capped by `ScalingConfig.MaximumConcurrency` when set on the event source mapping. FIFO queues always use a single poller to preserve message-group ordering. | | `LAMBDA_IGNORE_ARCHITECTURE` | `0` (default) | Whether to ignore the AWS architectures (x86_64 or arm64) configured for the lambda function. Set to `1` to run cross-platform compatible lambda functions natively (i.e., Docker selects architecture). | | `LAMBDA_K8S_IMAGE_PREFIX` | `amazon/aws-lambda-` (default, enterprise) | Prefix for images that will be used to execute Lambda functions in Kubernetes. | | `LAMBDA_K8S_INIT_IMAGE` | | Specify the image for downloading the init binary from LocalStack. The image must include the `curl` and `chmod` commands. This is only relevant for container-based Lambdas on Kubernetes | diff --git a/src/content/docs/aws/services/lambda.mdx b/src/content/docs/aws/services/lambda.mdx index 62ecdc26..7e9d8c19 100644 --- a/src/content/docs/aws/services/lambda.mdx +++ b/src/content/docs/aws/services/lambda.mdx @@ -306,7 +306,7 @@ import { Table, TableHeader, TableBody, TableHead, TableRow, TableCell } from '@ ScalingConfig The scaling configuration for the event source. [^3] - 🟡 + 🟢 🟡 ➖ ➖ @@ -428,7 +428,7 @@ import { Table, TableHeader, TableBody, TableHead, TableRow, TableCell } from '@ [^1]: Read more at [Control which events Lambda sends to your function](https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventfiltering.html) [^2]: The available Metadata properties may not have full parity with AWS depending on the event source (read more at [Understanding event filtering basics](https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventfiltering.html#filtering-basics)). -[^3]: For SQS Standard, `ScalingConfig` is accepted but not automatically applied — the poller count is currently hard-coded rather than scaled based on `MaximumConcurrency`. For SQS FIFO, a single poller is always used to preserve message-group ordering, so the scaling configuration is accepted but has no effect. +[^3]: For SQS Standard, LocalStack spawns multiple concurrent pollers per event source mapping (`LAMBDA_EVENT_SOURCE_MAPPING_SQS_POLLER_COUNT`, default `5`), and `ScalingConfig.MaximumConcurrency` caps the poller count when set. For SQS FIFO, a single poller is always used to preserve message-group ordering, so the scaling configuration is accepted but has no effect. [^4]: For SQS Standard, only `MinimumPollers` is honored (it sets the poller count); `MaximumPollers` has no effect. For SQS FIFO, the single-poller model means the configuration is accepted but ignored. Create a [GitHub Discussion](https://github.com/orgs/localstack/discussions/new/choose) or reach out to [LocalStack Support](/aws/help-support/get-help/) if you experience any challenges.