1

I recently tried to set up a warm pool for an ASG to reduce the launch time of scaling out. But it turns out the instance launched from the warm pool got stuck at the 'pending:wait' status and did not finish the deployment which should be done by CodeDeploy. At the same time, if an instance is launched from the ASG directly, it works well.

After contacting AWS support, I added a aws autoscaling complete-lifecycle-action command in the last line of the userdata to manually complete the CodeDeploy managed lifecycle hook. Also, I creted a Lambda Function triggered by a EventBridge rule that send aws autoscaling complete-lifecycle-action request to forcely make instances go into "inservice" status after launched from the warm pool. However, this method only makes the instance be in the "inservice" status but the deploymemt actually still not finished. The CodeDeploy activity history shows that the deployment is stuck and no Event is processed. When I remoted into the instance to have a look, I found the codedeploy agent is not even installed.

AWS support admits that the warm pool does not offically support CodeDeploy. However, he also confirms that these two services should work well with some extra works. Does any have a thought about this? Thanks in advance.

enter image description here

Baymax
  • 41
  • 4

0 Answers0