"""Step Functions common functions.""" import boto3 import config client = boto3.client('stepfunctions', region_name=config.AWS_REGION) def start_execution(execution_input, execution_name, state_machine_arn): """Start a state machine execution. Args: execution_input (str): String of JSON input data for the execution. execution_name (str): The name of the execution. state_machine_arn (str): The Amazon Resource Name of the state machine. Returns: Response from Step Functions. """ response = client.start_execution( input=execution_input, name=execution_name, stateMachineArn=state_machine_arn ) return response