Skip to main content

A simple CLI tool for triggering AWS ECS rollbacks

Project description

ecs-rollback

Single command rollback for AWS ECS

AWS CLI does not provide a native rollback command for ECS deployments. Hence, automating a rollback workflow requires multiple interdependent commands. This is not user-friendly, especially during production outages.

ecs-rollback is tool that solves this problem by allowing users to trigger hassle-free single command rollbacks

Prerequisites

ecs-rollback changes the task definition of your service to the (n-1)th task definition. Hence, it is important to note that the tool is effective only when the following ECS best practices are being followed in your CI/CD system:

  • Every new deployment should create a new task definition
  • Every Docker image linked to task definitions should be tagged with a unique tag (for e.g. git commit hash) rather than the latest tag

Although AWS does not force users to follow the above two practices, both of them are highly recommended (https://aws.amazon.com/blogs/compute/automating-rollback-of-failed-amazon-ecs-deployments/).

Installation

pip install ecs-rollback

Usage

ecs-rollback -c sample-cluster-name -s sample-service-name -r us-east-1

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ecs_rollback-1.0.0-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

Details for the file ecs_rollback-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: ecs_rollback-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 4.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.12.0

File hashes

Hashes for ecs_rollback-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8d5731f49baea97ed0a5f7594b8d0a322389448574cae604fe0dcc5e29b799d5
MD5 1ca8a1b88cd6d7ee539d655beeb63720
BLAKE2b-256 e58af0d2cfe31a389e7f106457b5bf77baff6aaa7c5d5d92f822ed2254a9e382

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page