我想在 ECS 集群上午餐任务并等待任务终止。
import boto3
client = boto3.client('ecs')
response = client.run_task(
cluster='default',
taskDefinition='RGB',
overrides={
'containerOverrides': [
{
'name': 'RGB',
'command': [
'python',
'-u',
'rgb.py'
]
}
]
}
)
arn = response["tasks"][0]['taskArn']
waiter = client.get_waiter('tasks_running')
waiter.wait(cluster='default', tasks=[arn])
这是正确的方法吗?
我得到: botocore.exceptions.WaiterError: Waiter TasksRunning failed: Waiter 遇到终端故障状态