@@ -0,0 +1,1396 @@
+#!/usr/bin/env python%0A%0A# This script retrieves a detailed list of the currently running checkins%0A%0Aimport argparse%0Aimport concurrent.futures%0Aimport datetime%0Aimport json%0Aimport sys%0A%0Aimport boto3%0A%0ASFN = boto3.client('stepfunctions')%0A%0Adef format_date_fields(obj):%0A    for key in obj:%0A        if isinstance(obj%5Bkey%5D, datetime.datetime):%0A            obj%5Bkey%5D = obj%5Bkey%5D.isoformat()%0A    return obj%0A%0Adef get_execution_details(execution_arn):%0A    e = SFN.describe_execution(executionArn=execution_arn)%0A    e = format_date_fields(e)%0A    del e%5B'ResponseMetadata'%5D%0A    return e%0A%0Adef main(args):%0A    results = %5B%5D%0A    state_machine_arn = args.state_machine_arn%0A%0A    # TODO(dw): pagination for %3E 100 executions%0A    executions = SFN.list_executions(%0A        stateMachineArn=state_machine_arn,%0A        statusFilter='RUNNING'%0A    )%0A%0A    with concurrent.futures.ThreadPoolExecutor(max_workers=8) as executor:%0A        futures = %5B%5D%0A        for e in executions%5B'executions'%5D:%0A            future = executor.submit(get_execution_details, e%5B'executionArn'%5D)%0A            futures.append(future)%0A        for future in concurrent.futures.as_completed(futures):%0A            results.append(future.result())%0A             %0A    print(json.dumps(results))%0A%0Aif __name__ == '__main__':%0A    parser = argparse.ArgumentParser()%0A    parser.add_argument('--state-machine-arn', required=True)%0A    args = parser.parse_args()%0A    main(args)%0A

Add script to list scheduled checkins