Rollback Fargate ECS deployement

If you deployed a new version of your project/app on Fargate ECS in AWS and it’s broken, you can easily re-deploy a previous version without fixing code an triggering CI/CD:

  • In ECS select your cluster > go to Tasks tab
  • In Task defitnion column, select your container for example “streamlit”
  • Click Create new revision
  • Set the docker on the desired tag (Image URI): for example one version before
  • Finally in the Services tab in the cluster, do Update on the corresponding service and set it to the last revision