You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 9, 2025. It is now read-only.
|`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. |
233
233
|`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. |
234
234
|`LAMBDA_DOWNLOAD_AWS_LAYERS`|`1` (default, pro) | Whether to download public Lambda layers from AWS through a LocalStack proxy when creating or updating functions. |
235
-
|`LAMBDA_EVENT_SOURCE_MAPPING`|`v2`| Use the new Lambda Event Source Mapping (ESM) implementation. (preview) |
236
235
|`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). |
237
236
|`LAMBDA_K8S_IMAGE_PREFIX`|`amazon/aws-lambda-` (default, pro) | Prefix for images that will be used to execute Lambda functions in Kubernetes. |
238
237
|`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 |
@@ -431,6 +430,7 @@ These configurations have already been removed and **won't have any effect** on
431
430
432
431
| Variable | Removed in | Example Values | Description |
433
432
| - | - | - | - |
433
+
|`LAMBDA_EVENT_SOURCE_MAPPING`| 4.0.0 |`v2` (default since [3.8.0](https://blog.localstack.cloud/localstack-release-v-3-8-0/#new-default-lambda-event-source-mapping-implementation)) \|`v1`| Feature flag to switch Lambda Event Source Mapping (ESM) implementations. |
434
434
| `S3_DIR` | 4.0.0 | `/path/to/root` | This was only supported for the `legacy_v2` provider. Configure a global parent directory that contains all buckets as sub-directories (`S3_DIR=/path/to/root`) or an individual directory that will get mounted as special bucket names (`S3_DIR=/path/to/root/bucket1:bucket1`). Only available for Localstack Pro.
435
435
|`<SERVICE>_BACKEND`| 3.0.0 |`http://localhost:7577`| Custom endpoint URL to use for a specific service, where `<SERVICE>` is the uppercase service name. |
436
436
|`<SERVICE>_PORT_EXTERNAL`| 3.0.0 |`4567`| Port number to expose a specific service externally . `SQS_PORT_EXTERNAL`, e.g. , is used when returning queue URLs from the SQS service to the client. |
Copy file name to clipboardExpand all lines: content/en/user-guide/aws/lambda/index.md
+4-22Lines changed: 4 additions & 22 deletions
Original file line number
Diff line number
Diff line change
@@ -167,11 +167,6 @@ Since [3.4.0](https://discuss.localstack.cloud/t/localstack-release-v3-4-0/871#n
167
167
You can [configure]({{< ref "configuration" >}}) `EVENT_RULE_ENGINE=java` (preview) to use the AWS [event-ruler](https://github.com/aws/event-ruler), which offers better parity.
168
168
{{< /callout >}}
169
169
170
-
{{< callout >}}
171
-
Since [3.7.0](https://blog.localstack.cloud/2024-08-29-localstack-release-v-3-7-0/#new-lambda-event-source-mapping-implementation), LocalStack supports a Event Source Mapping (ESM) implementation.
172
-
You can [configure]({{< ref "configuration" >}}) `LAMBDA_EVENT_SOURCE_MAPPING=v2` (preview) to use the new ESM implementation.
173
-
{{< /callout >}}
174
-
175
170
[Lambda event source mappings](https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventsourcemapping.html) allows you to connect Lambda functions to other AWS services.
176
171
The following event sources are supported in LocalStack:
177
172
@@ -180,31 +175,18 @@ The following event sources are supported in LocalStack:
180
175
-[Managed Streaming for Apache Kafka (MSK)](https://docs.aws.amazon.com/lambda/latest/dg/with-msk.html)
181
176
-[Simple Queue Service (SQS)](https://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html)
182
177
183
-
### New Lambda Event Source Mapping implementation
184
-
185
-
Since v3.8, LocalStack uses a new default implementation for [Lambda Event Source Mapping](https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventsourcemapping.html) (ESM) with improved reliability, performance, and AWS parity.
186
-
The new ESM v2 implementation is also compatible with the Java-based event pattern rule engine (`EVENT_RULE_ENGINE=java`) for better event filtering.
187
-
188
-
The improvements over ESM v1 include:
189
-
- Improved reliability through internal retries and separation of concern such that single exceptions or timeouts don't affect other event source mappings.
190
-
- Improved performance by enabling concurrent event source mappings rather than having a single thread handling everything.
191
-
- Improved AWS parity, related to events filtering, configuring failure destinations, (partial) batch failure handling, and SQS, Kinesis, & DynamoDB Streams events polling.
192
-
- Improved Kafka support for Amazon MSK and Self-Managed Kafka.
193
-
194
-
Create a [GitHub issue](https://github.com/localstack/localstack/issues/new/choose) or reach out to [LocalStack support](https://docs.localstack.cloud/getting-started/help-and-support/) if you experience any challenges.
195
-
You can temporarily switch back to the old implementation using the configuration `LAMBDA_EVENT_SOURCE_MAPPING=v1`.
196
-
The old implementation won't be available in the next major release.
197
-
198
178
The limitations compared to AWS include:
199
179
- Lambda Success Destinations are not supported.
200
-
- Only very basic validations are performed upon creating and updating ESM.
201
-
- Streaming Pollers for Kinesis and DynamoDB do not implement features like:
180
+
- Only basic validations are performed upon creating and updating ESM.
181
+
- Streaming Pollers for Kinesis and DynamoDB do not implement the following batching behavior configurations:
202
182
-`BisectBatchOnFunctionError`
203
183
-`MaximumBatchingWindowInSeconds`
204
184
-`ParallelizationFactor`
205
185
-`ScalingConfig`
206
186
-`TumblingWindowInSeconds`.
207
187
188
+
Create a [GitHub issue](https://github.com/localstack/localstack/issues/new/choose) or reach out to [LocalStack support](https://docs.localstack.cloud/getting-started/help-and-support/) if you experience any challenges.
189
+
208
190
## Lambda Layers (Pro)
209
191
210
192
[Lambda layers](https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html) let you include additional code and dependencies in your Lambda functions.
0 commit comments