AWS Blue Green Deployment: Possible Errors and Solutions

Gboyega Dada
Aug 21, 2019 · 2 min read

This is mostly meant to serve as troubleshooting notes to my future self.

Memento

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”

Solution:

  • Edit your deployment group
  • Scroll down to the Environment Configuration section (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!
Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade