AWS pipeline deployments failing

Motivation

I recently migrated to Ubuntu 18.04 and I noticed that there is a known bug on the AWS Pipeline, sometimes it gives errors when deploying.

Type of Errors:

  • Directory not empty @ dir_s_rmdir

Solution: Run the command below to remove all *-cleanup (the cleanup keeps a history of your previous installation, so it can know which file was changed)

sudo rm -rf /opt/codedeploy-agent/deployment-root/deployment-instructions/*-cleanup
  • The overall deployment failed because too many individual instances failed deployment, too few healthy instances are available for deployment, or some instances in your deployment group are experiencing problems.

Solution: In my case I found I had an errror in the appspec.yml

Once you run the pipeline again, the file is going to be created again.

This is the official report

Other issues with deployment can be found here