'boto3 waiter for ECS ServicesStable

I am using boto3 to deploy my ECS services. I have added the boto3 waiter for ECS as:

ecs_client = boto3.client('ecs', config=my_config)
waiter = ecs_client.get_waiter('services_stable')
waiter.wait(
    cluster="myCluster",
    services=["myService"],
    WaiterConfig={
        'Delay': 15,
        'MaxAttempts': 60
    }
)
print("Service is in steady state.")

The above ECS waiter works perfectly, but my ECS service takes about 5 minutes to be in running state and while executing the boto3 script, we had to wait 5 minutes with blank terminal.

Is it possible to print some message in terminal at fixed interval until the waiter is complete?

Any suggestions are appreciated.

Thanks.



Solution 1:[1]

A quick review of the waiter code shows no functionality for logging status as you wait to complete. You'll need to create your own code for this functionality.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Coin Graham