Skip to content

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.

asked 2 years ago413 views

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

EXPERT

answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.