The deployment failed because no instances were found in your blue fleet.

1

The deployment failed because no instances were found in your blue fleet.

1 Answer
0

Hello there,

The error “The deployment failed because no instances were found in your blue fleet.” generally occurs because CodeDeploy is not able to find the AutoScaling Group. It may be the case where the AutoScaling Group was deleted and not present. Make sure the Auto Scaling Group exist.

In brief, during Blue/Green deployment, if the configuration for your deployment group, the "COPY_AUTO_SCALING_GROUP" action is specified. This configuration means that settings from a specified Auto Scaling group are used to define and create instances in a new Auto Scaling group for deployments. CodeDeploy will use the newly created ASG to switch over but if the deployment fails CodeDeploy does not delete this ASG that is created. The new Auto Scaling Group might be discarded or left empty. The ASG still remains in the configuration. This in turn can result in subsequent Blue/Green deployments failing due to the "no instances were found in your blue fleet" error.

To resolve, you can try changing the Auto Scaling Group associated with your deployment group in the environment configuration back to the last successfully deployed Auto Scaling Group. Next ensure that the current ASG is not deleted during the deployment and retry the deployment.

But it could be that the causes of the issue you encountered are different and will require some deeper investigation by checking your resource configurations. Thus, currently due to the limited information available, I would suggest you to reach out to AWS Code Deploy Support team with a case an efficient troubleshooting. Please share your deployment ID, deployment group name, Application name, region when you create a case. We’ll be more than happy to assist you with this case.

References:

[1] https://aws.amazon.com/blogs/devops/performing-bluegreen-deployments-with-aws-codedeploy-and-auto-scaling-groups/

[2] https://docs.aws.amazon.com/codedeploy/latest/userguide/troubleshooting-auto-scaling.html#troubleshooting-deployment-failed-because-no-instances-found

[3] https://docs.aws.amazon.com/codedeploy/latest/userguide/deployment-groups-edit.html#deployment-groups-edit-console

AWS
SUPPORT ENGINEER
Rajat_G
answered a year ago
  • AutoScaling Group exists, and it has reached the deployment step once, although it failed.

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions