I recently started using AWS CodeDeploy and noticed that the AllowTraffic
step consistently takes between 3 and 4 minutes per instance. I've configured the health check interval to be 10 seconds and the health threshold to be 2, so I expect it to take 20 seconds. I'm using a Network Load Balancer.
I have polled on the NLB's deployment group using describe-target-health
and confirmed that the target is in the initial
state for the 3+ minutes that CodeDeploy is waiting. I have also confirmed that the server on the health check port is responsive at the very beginning of the three minutes.
What are other possible reasons for CodeDeploy / NLB to be so slow?