Error 1: The deployment failed because no instances were found in your blue fleet
This might happen if a previous deployment failed. Whenever
CodeDeploy tries to deploy your application, it creates a new
Auto-Scaling Group. It will then add the name of the new auto scaling group to the environment config of your deployment group. The new auto scaling group is used as your
BLUE group in future deployments.
But if the current deployment fails, the new auto scaling group might be discarded or be left empty. So the next time
CodeDeploy tries to deploy your application it will fail with the error: “The deployment failed because no instances were found in your blue fleet”
- Edit your deployment group
- Scroll down to the
Environment Configurationsection (see screenshot above 👆)
- Change the Auto Scaling Group back to the correct one (the last successfully deployed Auto Scaling Group)
- Save and go back to your pipeline and then click on retry. Voila!