CloudFormation DependsOn and ECS minimumHealthyPercent

0

The goal is to have a chain of ECS services, ServiceA and ServiceB, where ServiceB depends on ServiceA.

I configure the dependency using CloudFormation's DependsOn.

Assume that ServiceA is configured to have desiredCount=1 and minimumHealthyPercent=0.

When I deploy the stack, when does CloudFormation consider the dependency of ServiceA to be fulfilled and starts deploying ServiceB?

One reading is that since minimumHealthyPercent is 0, ServiceA is finished as soon as it is created. Another possibility is that since desiredCount is 1 the service is fully deployed only when one task has reached the RUNNING state. Which reading is correct (if any)?

1개 답변
0

Hi AWS-User-5431698,

Based upon my experience working with AWS CloudFormation, I would expect AWS CloudFormation to follow the order specified by DependsOn between the AWS CloudFormation resources defined in your template. Properties within a given resource type shouldn't have an impact on the creation order.

I hope this helps,

Chris

profile pictureAWS
Chris_S
답변함 2년 전
  • Hi Chris, thanks for your reply. However, I still don't understand when CloudFormation would consider the requirement of the DependsOn parameter to be fulfilled. For instance, there was a discussion in the AWS Developers Forum (https://forums.aws.amazon.com/thread.jspa?messageID=537003&#537003) where it was stated that an instance "should" be considered successfully created when it reached the running state. So even if CloudFormation ignores the specific parameters, it would still be interesting to know when the second service will be started.

  • Hi Chris. Did you have a time to look at this? When does CloudFormation consider an ECS service to be completed, i.e. when will CloudFormation start creating an object which has a DependsOn attribute on the ECS service?

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠