0
votes

I have a AWS CodeDeploy which deploy 3 Instances. No matter what deployment configure I set (oneAtTime, halfAtTime, allAtTime) or even use customized type (HOST_COUNT, min_health_host = 2 (cannot set 3 because that is not how codedeploy works), sometime I got codeDepoly succeeds even only 2 instances are successfully deployed.

I have talked to AWS support center. They said it is expected and I know why it is expected. Looks like their calculation works only if there are tons of instances to be deployed.

But in my case, it does not make sense that 2 out of 3 success means success. Is anybody unhappy about this behaviors and have any workaround?

1
Have you tried to look into codedeploy agent logs on your server? - Praveen Govind
Thanks Praveen Govind. why do I need to read codedeploy agent log? And where are the log locate? - user389955

1 Answers

1
votes

The way CodeDeploy seems to have been designed is to try to have successful overall deployments, so, if you are looking to have your overall deployment to fail because one of the instance deployments failed, then maybe CodeDeploy is not what you are looking for. Additionally, this is the math behind the deployment configurations and the overall deployment failures for 3 instances:

  • AllAtOnce: The overall deployment will fail only if ALL 3 instance deployments failed. Meaning that having 1 successful instance deployment then the overall deployment will be successful.
  • HalfAtATime: The overall deployment will fail if 2 instance deployments failed. Having 2 instance deployments successful means the overall deployment will be successful.
  • OneAtATime: The overall deployment will fail if the first or the second deployment fails. If the third deployment fails, the overall deployment will be successful.