Direkt zum Inhalt

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.

gefragt vor 2 Jahren416 Aufrufe

1 Antwort
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

EXPERTE

beantwortet vor 2 Jahren

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.