After CodeDeploy clones AutoScalingGroup, it leaves LoadBalancer field empty. This leads to following problem: when instance webserver dies, ELB does not understand instance is "down", this instance is not replaced automatically. However, if i set LoadBalancer manually, it will work fine afterwards.
I watched how new ASG is cloned. There is possibility to suspend some processes while instance is booting. So as i understand, CodeDeploy suspends all actions related to ELB, because it uses his own automatic scripts to un-attach old instances and attach new ones to ELB.
I dont use any custom attach or un-attach scripts myself.
Otherwise deployment runs ok, and new instances are created correctly.