跳至內容

In an ECS Task Container deployment order

0

Can I use the CDK in Typescript to set or manipulate the container deployment order? I have 3 containers in a task, A, B, C. However, C should only be deployed when A and B are in the last status "Running". This is because container C has dependencies on A and B.

已提問 2 年前檢視次數 417 次

1 個回答
0

Hello.

By using "dependsOn" in the task definition, it is possible to run it after the container has started.
https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ecs.ContainerDefinition.html#containerdependencies

I think it is possible with CDK by using "containerDependencies" in the container definition.
https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ecs.ContainerDependency.html

專家

已回答 2 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。