Skip to content

Commit d48ca94

Browse files
bchamppvalerena
andauthored
chore: bind lambda RIE to 0.0.0.0 for durable functions (#8483)
Co-authored-by: Renato Valenzuela <37676028+valerena@users.noreply.github.com>
1 parent f30d12b commit d48ca94

4 files changed

Lines changed: 3 additions & 3 deletions

File tree

samcli/local/docker/durable_lambda_container.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@ def _update_lambda_environment_with_emulator_endpoint(self, kwargs):
5959
extra_hosts["host.docker.internal"] = "host-gateway"
6060
kwargs["extra_hosts"] = extra_hosts
6161

62+
# Bind to 0.0.0.0 so emulator can reach Lambda via host.docker.internal
63+
kwargs["container_host_interface"] = "0.0.0.0"
64+
6265
def _get_lambda_container_endpoint(self):
6366
"""
6467
Get the Lambda container endpoint URL for the emulator to invoke.

tests/integration/durable_integ_base.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ def tearDownClass(cls):
6262
def get_invoke_command_list(self, function_name, **kwargs):
6363
"""Get command list for invoking a durable function with built template."""
6464
kwargs.setdefault("template_path", str(self.built_template_path))
65-
kwargs.setdefault("container_host_interface", "0.0.0.0")
6665
return self.get_command_list(function_name, **kwargs)
6766

6867
def get_execution_history_command_list(self, execution_arn, output_format="json"):

tests/integration/local/start_api/test_start_api_durable.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212
class TestStartApiDurable(DurableIntegBase, StartApiIntegBaseClass):
1313
template_path = "/testdata/durable/template.yaml"
14-
container_host_interface = "0.0.0.0"
1514

1615
@classmethod
1716
def setUpClass(cls):

tests/integration/local/start_lambda/test_start_lambda_durable.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121

2222

2323
class TestStartLambdaDurable(DurableIntegBase, StartLambdaIntegBaseClass):
24-
container_host_interface = "0.0.0.0"
2524
collect_start_lambda_process_output = True
2625

2726
@classmethod

0 commit comments

Comments
 (0)