diff --git a/src/aws_durable_execution_sdk_python_testing/cli.py b/src/aws_durable_execution_sdk_python_testing/cli.py index 07dcb7e..69721c2 100644 --- a/src/aws_durable_execution_sdk_python_testing/cli.py +++ b/src/aws_durable_execution_sdk_python_testing/cli.py @@ -457,7 +457,7 @@ def get_durable_execution_history_command(self, args: argparse.Namespace) -> int def _create_boto3_client( self, endpoint_url: str | None = None, region_name: str | None = None ) -> Any: - """Create boto3 client for lambdainternal-local service. + """Create boto3 client for lambdainternal service. Args: endpoint_url: Optional endpoint URL override @@ -481,7 +481,7 @@ def _create_boto3_client( # Create client with local endpoint - no AWS access keys required return boto3.client( - "lambdainternal-local", + "lambdainternal", endpoint_url=final_endpoint, region_name=final_region, ) diff --git a/src/aws_durable_execution_sdk_python_testing/invoker.py b/src/aws_durable_execution_sdk_python_testing/invoker.py index af386a7..7ae00ee 100644 --- a/src/aws_durable_execution_sdk_python_testing/invoker.py +++ b/src/aws_durable_execution_sdk_python_testing/invoker.py @@ -85,7 +85,6 @@ def create_invocation_input( operations=execution.operations, next_marker="", ), - is_local_runner=False, service_client=self.service_client, ) @@ -135,7 +134,6 @@ def create_invocation_input( operations=execution.operations, next_marker="", ), - is_local_runner=False, ) def invoke( diff --git a/src/aws_durable_execution_sdk_python_testing/runner.py b/src/aws_durable_execution_sdk_python_testing/runner.py index 31343e5..b60a07f 100644 --- a/src/aws_durable_execution_sdk_python_testing/runner.py +++ b/src/aws_durable_execution_sdk_python_testing/runner.py @@ -850,13 +850,13 @@ def stop(self) -> None: self._executor = None def _create_boto3_client(self) -> Any: - """Create boto3 client for lambdainternal-local service. + """Create boto3 client for lambdainternal service. Configures AWS data path and creates a boto3 client with the local runner endpoint and region from configuration. Returns: - Configured boto3 client for lambdainternal-local service + Configured boto3 client for lambdainternal service Raises: Exception: If client creation fails - exceptions propagate naturally @@ -869,7 +869,7 @@ def _create_boto3_client(self) -> Any: # Create client with Lambda endpoint configuration return boto3.client( - "lambdainternal-local", + "lambdainternal", endpoint_url=self._config.lambda_endpoint, region_name=self._config.local_runner_region, ) diff --git a/tests/cli_test.py b/tests/cli_test.py index 4213616..b4f8a5a 100644 --- a/tests/cli_test.py +++ b/tests/cli_test.py @@ -1004,7 +1004,7 @@ def test_create_boto3_client_sets_up_aws_data_path() -> None: # Verify boto3 client is created with correct parameters mock_boto3_client.assert_called_once_with( - "lambdainternal-local", + "lambdainternal", endpoint_url=app.config.local_runner_endpoint, region_name=app.config.local_runner_region, ) diff --git a/tests/invoker_test.py b/tests/invoker_test.py index 33c02a8..e7fe4e1 100644 --- a/tests/invoker_test.py +++ b/tests/invoker_test.py @@ -69,7 +69,6 @@ def test_in_process_invoker_create_invocation_input(): assert invocation_input.durable_execution_arn == execution.durable_execution_arn assert invocation_input.checkpoint_token is not None assert isinstance(invocation_input.initial_execution_state, InitialExecutionState) - assert invocation_input.is_local_runner is False assert invocation_input.service_client is service_client @@ -86,7 +85,6 @@ def test_in_process_invoker_invoke(): durable_execution_arn="test-arn", checkpoint_token="test-token", # noqa: S106 initial_execution_state=InitialExecutionState(operations=[], next_marker=""), - is_local_runner=False, ) result = invoker.invoke("test-function", input_data) @@ -149,7 +147,6 @@ def test_lambda_invoker_create_invocation_input(): assert invocation_input.durable_execution_arn == execution.durable_execution_arn assert invocation_input.checkpoint_token is not None assert isinstance(invocation_input.initial_execution_state, InitialExecutionState) - assert invocation_input.is_local_runner is False def test_lambda_invoker_invoke_success(): @@ -173,7 +170,6 @@ def test_lambda_invoker_invoke_success(): durable_execution_arn="test-arn", checkpoint_token="test-token", # noqa: S106 initial_execution_state=InitialExecutionState(operations=[], next_marker=""), - is_local_runner=False, ) result = invoker.invoke("test-function", input_data) @@ -211,7 +207,6 @@ def test_lambda_invoker_invoke_failure(): durable_execution_arn="test-arn", checkpoint_token="test-token", # noqa: S106 initial_execution_state=InitialExecutionState(operations=[], next_marker=""), - is_local_runner=False, ) with pytest.raises( @@ -286,7 +281,6 @@ def test_lambda_invoker_invoke_empty_function_name(): durable_execution_arn="test-arn", checkpoint_token="test-token", initial_execution_state=InitialExecutionState(operations=[], next_marker=""), - is_local_runner=False, ) with pytest.raises( @@ -308,7 +302,6 @@ def test_lambda_invoker_invoke_whitespace_function_name(): durable_execution_arn="test-arn", checkpoint_token="test-token", initial_execution_state=InitialExecutionState(operations=[], next_marker=""), - is_local_runner=False, ) with pytest.raises( @@ -337,7 +330,6 @@ def test_lambda_invoker_invoke_status_202(): durable_execution_arn="test-arn", checkpoint_token="test-token", initial_execution_state=InitialExecutionState(operations=[], next_marker=""), - is_local_runner=False, ) result = invoker.invoke("test-function", input_data) @@ -367,7 +359,6 @@ def test_lambda_invoker_invoke_function_error(): durable_execution_arn="test-arn", checkpoint_token="test-token", initial_execution_state=InitialExecutionState(operations=[], next_marker=""), - is_local_runner=False, ) with pytest.raises( @@ -446,7 +437,6 @@ class MockResourceNotFoundException(Exception): durable_execution_arn="test-arn", checkpoint_token="test-token", initial_execution_state=InitialExecutionState(operations=[], next_marker=""), - is_local_runner=False, ) with pytest.raises( @@ -481,7 +471,6 @@ class MockInvalidParameterValueException(Exception): durable_execution_arn="test-arn", checkpoint_token="test-token", initial_execution_state=InitialExecutionState(operations=[], next_marker=""), - is_local_runner=False, ) with pytest.raises(InvalidParameterValueException, match="Invalid parameter"): @@ -510,7 +499,6 @@ class MockServiceException(Exception): durable_execution_arn="test-arn", checkpoint_token="test-token", initial_execution_state=InitialExecutionState(operations=[], next_marker=""), - is_local_runner=False, ) with pytest.raises(DurableFunctionsTestError, match="Lambda invocation failed"): @@ -539,7 +527,6 @@ class MockEC2Exception(Exception): durable_execution_arn="test-arn", checkpoint_token="test-token", initial_execution_state=InitialExecutionState(operations=[], next_marker=""), - is_local_runner=False, ) with pytest.raises(DurableFunctionsTestError, match="Lambda infrastructure error"): @@ -568,7 +555,6 @@ class MockKMSException(Exception): durable_execution_arn="test-arn", checkpoint_token="test-token", initial_execution_state=InitialExecutionState(operations=[], next_marker=""), - is_local_runner=False, ) with pytest.raises(DurableFunctionsTestError, match="Lambda KMS error"): @@ -600,7 +586,6 @@ class MockDurableExecutionAlreadyStartedException(Exception): durable_execution_arn="test-arn", checkpoint_token="test-token", initial_execution_state=InitialExecutionState(operations=[], next_marker=""), - is_local_runner=False, ) with pytest.raises( @@ -624,7 +609,6 @@ def test_lambda_invoker_invoke_unexpected_exception(): durable_execution_arn="test-arn", checkpoint_token="test-token", initial_execution_state=InitialExecutionState(operations=[], next_marker=""), - is_local_runner=False, ) with pytest.raises( diff --git a/tests/runner_web_test.py b/tests/runner_web_test.py index 711fc47..6fd11b5 100644 --- a/tests/runner_web_test.py +++ b/tests/runner_web_test.py @@ -417,7 +417,7 @@ def test_should_handle_boto3_client_creation_with_custom_config(): # Assert - Verify boto3 client was called with correct parameters mock_boto3_client.assert_called_once_with( - "lambdainternal-local", + "lambdainternal", endpoint_url="http://custom-endpoint:8080", region_name="eu-west-1", ) @@ -442,7 +442,7 @@ def test_should_handle_boto3_client_creation_with_defaults(): # Assert - Verify boto3 client was called with default parameters mock_boto3_client.assert_called_once_with( - "lambdainternal-local", + "lambdainternal", endpoint_url="http://127.0.0.1:3001", # Default lambda_endpoint value region_name="us-west-2", # Default value ) @@ -773,7 +773,7 @@ def test_should_pass_correct_boto3_client_to_lambda_invoker(): # Assert - Verify boto3 client was created with correct parameters mock_boto3_client.assert_called_once_with( - "lambdainternal-local", + "lambdainternal", endpoint_url="http://test-endpoint:7777", region_name="ap-southeast-2", )