{"id":21116379,"url":"https://github.com/eraclitux/ecsundo","last_synced_at":"2025-07-08T19:30:46.758Z","repository":{"id":57569001,"uuid":"159952030","full_name":"eraclitux/ecsundo","owner":"eraclitux","description":"Rollback ECS deployments","archived":false,"fork":false,"pushed_at":"2023-09-04T20:55:34.000Z","size":19,"stargazers_count":27,"open_issues_count":3,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-04T09:11:46.468Z","etag":null,"topics":["aws","devops","docker","ecs"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eraclitux.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-12-01T14:21:45.000Z","updated_at":"2024-04-20T12:28:16.000Z","dependencies_parsed_at":"2024-06-20T16:22:03.926Z","dependency_job_id":"e8220831-77f8-430a-922c-176b603ed70b","html_url":"https://github.com/eraclitux/ecsundo","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/eraclitux/ecsundo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eraclitux%2Fecsundo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eraclitux%2Fecsundo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eraclitux%2Fecsundo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eraclitux%2Fecsundo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eraclitux","download_url":"https://codeload.github.com/eraclitux/ecsundo/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eraclitux%2Fecsundo/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264333827,"owners_count":23592299,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws","devops","docker","ecs"],"created_at":"2024-11-20T02:27:32.379Z","updated_at":"2025-07-08T19:30:46.490Z","avatar_url":"https://github.com/eraclitux.png","language":"Go","readme":"# ecsundo\n\n[![Go Report Card](https://goreportcard.com/badge/github.com/eraclitux/ecsundo)](https://goreportcard.com/report/github.com/eraclitux/ecsundo)\n[![CircleCI](https://circleci.com/gh/eraclitux/ecsundo.svg?style=svg)](https://circleci.com/gh/eraclitux/ecsundo)\n\n`ecsundo` is cli tool able to rollback ECS\n[services](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs_services.html)\nin a given cluster to their previous or to specific\n[task](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definitions.html)\nversions.\n\nIt is capable of making and restoring \"snapshots\" of service versions.\n\n## Motivations\n\nProbably your code is automatically deployed by a CI/CD pipeline.\nIf something goes wrong it may take several minutes to bring a rollback commit in production, with `ecsundo` this time is cut to seconds.\n\n## Prerequisites\n\nTo use this tool, the deploy procedure must involve creating a new task version with a new image tag.\nA great way to tag container images is to include the commit hash of the code that they contain, doing so it will\nbe possible to find the task version you want to come back to if problems arise.\n[Learn more](https://medium.com/@eraclitux/deployment-rollback-in-a-containers-world-aws-ecs-edition-4bc8e34c0d5a) about this.\n\n## Usage examples\n\nRollback _all_ services in a cluster to previous version:\n\n```\n$ ecsundo cluster \u003ccluster-name\u003e\n```\n\nRollback a service to the previous version:\n\n```\n$ ecsundo service -c \u003ccluster-name\u003e \u003cservice-name\u003e\n```\n\nMake a _snapshot_ of all services versions in a cluster:\n\n```\n$ ecsundo cluster snapshot \u003ccluster-name\u003e\n```\n\nRestore a _snapshot_ of a versions of all services in a cluster:\n\n```\n$ ecsundo cluster restore \u003ccluster-name\u003e\n```\n\nTo learn more, use on line help:\n\n```\n$ ecsundo help\n```\n\n## Configuration\n\nTo avoid to specify cluster name, an environment variable can be used:\n\n```\nECSUNDO_CLUSTER=\u003ccluster-name\u003e\n```\n\nor a configuration file (default path `~/.ecsundo.yml`):\n\n```\ncluster: \u003ccluster-name\u003e\n```\n\nProper **permissions** must be granted for the tool to operate properly.\nIf you install this tool inside AWS, the best way, from a security standpoint, is to use an IAM role that lets you avoid copying around `AWS_SECRETS`. The role should have at least this permissions:\n\n```\n{\n    \"Version\": \"2012-10-17\",\n    \"Statement\": [\n        {\n            \"Sid\": \"VisualEditor0\",\n            \"Effect\": \"Allow\",\n            \"Action\": [\n                \"ecs:ListAttributes\",\n                \"ecs:DescribeTaskDefinition\",\n                \"ecs:DescribeClusters\",\n                \"ecs:ListServices\",\n                \"ecs:UpdateService\",\n                \"ecs:ListTasks\",\n                \"ecs:ListTaskDefinitionFamilies\",\n                \"ecs:RegisterTaskDefinition\",\n                \"ecs:DescribeServices\",\n                \"ecs:ListContainerInstances\",\n                \"ecs:DescribeContainerInstances\",\n                \"ecs:DescribeTasks\",\n                \"ecs:ListTaskDefinitions\",\n                \"ecs:ListClusters\"\n            ],\n            \"Resource\": \"*\"\n        }\n    ]\n}\n```\n\n### Use from local shell\n\nA prerequisite is that aws-cli is installed and configured, this is true if credentials file exists (e.g. `ls ~/.aws/credentials`). To use these credentials:\n\n```\nAWS_SDK_LOAD_CONFIG=1 ecsundo cluster snapshot \u003cmy-cluster\u003e\n```\n\nYour credentials must have at least same permissions of the role above.\n\n## Installation\n\n[//]: # \"Precompiled binaries can be found [here](https://github.com/eraclitux/ecsundo/releases).\"\n\nTo install the latest (unstable) version:\n\n```\ngo get -u github.com/eraclitux/ecsundo\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feraclitux%2Fecsundo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feraclitux%2Fecsundo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feraclitux%2Fecsundo/lists"}