Skip to content

Commit fd6c627

Browse files
committed
Remove legacy Lambda ESM v1 feature (#11733)
1 parent 40473c0 commit fd6c627

22 files changed

+78
-2043
lines changed

localstack-core/localstack/config.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -964,9 +964,6 @@ def populate_edge_configuration(
964964
# Additional flags passed to Docker run|create commands.
965965
LAMBDA_DOCKER_FLAGS = os.environ.get("LAMBDA_DOCKER_FLAGS", "").strip()
966966

967-
# PUBLIC: v2 (default), v1 (deprecated) Version of the Lambda Event Source Mapping implementation
968-
LAMBDA_EVENT_SOURCE_MAPPING = os.environ.get("LAMBDA_EVENT_SOURCE_MAPPING", "v2").strip()
969-
970967
# PUBLIC: 0 (default)
971968
# Enable this flag to run cross-platform compatible lambda functions natively (i.e., Docker selects architecture) and
972969
# ignore the AWS architectures (i.e., x86_64, arm64) configured for the lambda function.
@@ -1042,10 +1039,6 @@ def populate_edge_configuration(
10421039
) # the 100 comes from the init defaults
10431040
)
10441041

1045-
LAMBDA_SQS_EVENT_SOURCE_MAPPING_INTERVAL_SEC = float(
1046-
os.environ.get("LAMBDA_SQS_EVENT_SOURCE_MAPPING_INTERVAL_SEC") or 1.0
1047-
)
1048-
10491042
# DEV: 0 (default unless in host mode on macOS) For LS developers only. Only applies to Docker mode.
10501043
# Whether to explicitly expose a free TCP port in lambda containers when invoking functions in host mode for
10511044
# systems that cannot reach the container via its IPv4. For example, macOS cannot reach Docker containers:

localstack-core/localstack/deprecations.py

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,17 @@ def is_affected(self) -> bool:
281281
"This option is ignored because the LocalStack SQS dependency for event invokes has been removed since 4.0.0"
282282
" in favor of a lightweight Lambda-internal SQS implementation.",
283283
),
284+
EnvVarDeprecation(
285+
"LAMBDA_EVENT_SOURCE_MAPPING",
286+
"4.0.0",
287+
"This option has no effect anymore. Please remove this environment variable.",
288+
),
289+
EnvVarDeprecation(
290+
"LAMBDA_SQS_EVENT_SOURCE_MAPPING_INTERVAL_SEC",
291+
"4.0.0",
292+
"This option is not supported by the new Lambda Event Source Mapping v2 implementation."
293+
" Please create a GitHub issue if you experience any performance challenges.",
294+
),
284295
]
285296

286297

@@ -328,20 +339,6 @@ def log_deprecation_warnings(deprecations: Optional[List[EnvVarDeprecation]] = N
328339
affected_deprecations = collect_affected_deprecations(deprecations)
329340
log_env_warning(affected_deprecations)
330341

331-
feature_override_lambda_esm = os.environ.get("LAMBDA_EVENT_SOURCE_MAPPING")
332-
if feature_override_lambda_esm and feature_override_lambda_esm in ["v1", "legacy"]:
333-
env_var_value = f"LAMBDA_EVENT_SOURCE_MAPPING={feature_override_lambda_esm}"
334-
deprecation_version = "3.8.0"
335-
deprecation_path = (
336-
f"Remove {env_var_value} to use the new Lambda Event Source Mapping implementation."
337-
)
338-
LOG.warning(
339-
"%s is deprecated (since %s) and will be removed in upcoming releases of LocalStack! %s",
340-
env_var_value,
341-
deprecation_version,
342-
deprecation_path,
343-
)
344-
345342

346343
def deprecated_endpoint(
347344
endpoint: Callable, previous_path: str, deprecation_version: str, new_path: str

localstack-core/localstack/services/lambda_/event_source_listeners/__init__.py

Whitespace-only changes.

localstack-core/localstack/services/lambda_/event_source_listeners/adapters.py

Lines changed: 0 additions & 263 deletions
This file was deleted.

0 commit comments

Comments
 (0)