8000 Remove legacy Lambda ESM v1 · localstack/localstack@ede91bb · GitHub
[go: up one dir, main page]

Skip to content

Commit ede91bb

Browse files
joe4devdfangl
authored andcommitted
Remove legacy Lambda ESM v1
1 parent 0de916a commit ede91bb

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
@@ -961,9 +961,6 @@ def populate_edge_configuration(
961961
# Additional flags passed to Docker run|create commands.
962962
LAMBDA_DOCKER_FLAGS = os.environ.get("LAMBDA_DOCKER_FLAGS", "").strip()
963963

964-
# PUBLIC: v2 (default), v1 (deprecated) Version of the Lambda Event Source Mapping implementation
965-
LAMBDA_EVENT_SOURCE_MAPPING = os.environ.get("LAMBDA_EVENT_SOURCE_MAPPING", "v2").strip()
966-
967964
# PUBLIC: 0 (default)
968965
# Enable this flag to run cross-platform compatible lambda functions natively (i.e., Docker selects architecture) and
969966
# ignore the AWS architectures (i.e., x86_64, arm64) configured for the lambda function.
@@ -1039,10 +1036,6 @@ def populate_edge_configuration(
10391036
) # the 100 comes from the init defaults
10401037
)
10411038

1042-
LAMBDA_SQS_EVENT_SOURCE_MAPPING_INTERVAL_SEC = float(
1043-
os.environ.get("LAMBDA_SQS_EVENT_SOURCE_MAPPING_INTERVAL_SEC") or 1.0
1044-
)
1045-
10461039
# DEV: 0 (default unless in host mode on macOS) For LS developers only. Only applies to Docker mode.
10471040
# Whether to explicitly expose a free TCP port in lambda containers when invoking functions in host mode for
10481041
# 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)
0