Kris
Kris

Reputation: 4823

Amazon Fargate - determine container startup order

Is there a way in Amazon Fargate to determine the startup order of containers? Let's say I have two containers and I want container B to start only when A is already up. In other Amazon ECS I could use links to achieve this, but links are not supported in Fargate's awsvpc network mode.

Upvotes: 1

Views: 3344

Answers (3)

grandmaestr
grandmaestr

Reputation: 169

If you are using the AWS Task Definition wizard, you can configure this under the section "Container Definitions". Edit (or add) your container, then scroll down to the section "STARTUP DEPENDENCY ORDERING". You can choose from four options: start, complete, success, healthy.

Upvotes: 2

wonton
wonton

Reputation: 8247

As of March 2019, this feature is now available! https://aws.amazon.com/about-aws/whats-new/2019/03/amazon-ecs-introduces-enhanced-container-dependency-management/

The way you do this is with dependsOn in your task definition. e.g. if you want a container to start only after a container foo has started, you do

"dependsOn": [
   {
       "containerName": "foo",
       "condition": "START"
   }
]

Upvotes: 10

Samuel Karp
Samuel Karp

Reputation: 4672

There is no explicit way to control ordering in Fargate today, but it's on the roadmap.

Upvotes: 0

Related Questions