3131 StartDurableExecutionInput ,
3232)
3333from aws_durable_execution_sdk_python_testing .runner import WebRunner , WebRunnerConfig
34+ from aws_durable_execution_sdk_python_testing .stores import StoreType
3435from aws_durable_execution_sdk_python_testing .web .server import WebServiceConfig
3536
3637
@@ -50,6 +51,10 @@ class CliConfig:
5051 local_runner_region : str = "us-west-2"
5152 local_runner_mode : str = "local"
5253
54+ # Store configuration
55+ store_type : str = "memory"
56+ store_path : str | None = None
57+
5358 @classmethod
5459 def from_environment (cls ) -> CliConfig :
5560 """Create configuration from environment variables with defaults."""
@@ -69,6 +74,8 @@ def from_environment(cls) -> CliConfig:
6974 ),
7075 local_runner_region = os .getenv ("AWS_DEX_LOCAL_RUNNER_REGION" , "us-west-2" ),
7176 local_runner_mode = os .getenv ("AWS_DEX_LOCAL_RUNNER_MODE" , "local" ),
77+ store_type = os .getenv ("AWS_DEX_STORE_TYPE" , "memory" ),
78+ store_path = os .getenv ("AWS_DEX_STORE_PATH" ),
7279 )
7380
7481
@@ -188,6 +195,17 @@ def _create_start_server_parser(self, subparsers) -> None:
188195 default = self .config .local_runner_mode ,
189196 help = f"Local Runner mode (default: { self .config .local_runner_mode } , env: AWS_DEX_LOCAL_RUNNER_MODE)" ,
190197 )
198+ start_server_parser .add_argument (
199+ "--store-type" ,
200+ choices = [store_type .value for store_type in StoreType ],
201+ default = self .config .store_type ,
202+ help = f"Store type for execution persistence (default: { self .config .store_type } , env: AWS_DEX_STORE_TYPE)" ,
203+ )
204+ start_server_parser .add_argument (
205+ "--store-path" ,
206+ default = self .config .store_path ,
207+ help = f"Path for filesystem store (default: { self .config .store_path or '.durable_executions' } , env: AWS_DEX_STORE_PATH)" ,
208+ )
191209 start_server_parser .set_defaults (func = self .start_server_command )
192210
193211 def _create_invoke_parser (self , subparsers ) -> None :
@@ -258,6 +276,8 @@ def start_server_command(self, args: argparse.Namespace) -> int:
258276 local_runner_endpoint = args .local_runner_endpoint ,
259277 local_runner_region = args .local_runner_region ,
260278 local_runner_mode = args .local_runner_mode ,
279+ store_type = args .store_type ,
280+ store_path = args .store_path ,
261281 )
262282
263283 logger .info (
@@ -273,6 +293,10 @@ def start_server_command(self, args: argparse.Namespace) -> int:
273293 logger .info (" Local Runner Endpoint: %s" , args .local_runner_endpoint )
274294 logger .info (" Local Runner Region: %s" , args .local_runner_region )
275295 logger .info (" Local Runner Mode: %s" , args .local_runner_mode )
296+ logger .info (" Store Type: %s" , args .store_type )
297+ if args .store_type == "filesystem" :
298+ store_path = args .store_path or ".durable_executions"
299+ logger .info (" Store Path: %s" , store_path )
276300
277301 # Use runner as context manager for proper lifecycle
278302 with WebRunner (runner_config ) as runner :
0 commit comments