{"id":19769351,"url":"https://github.com/abiydv/serverless-aws-lambda-ecs-rollback","last_synced_at":"2026-04-18T11:32:37.817Z","repository":{"id":177337877,"uuid":"168741856","full_name":"abiydv/serverless-aws-lambda-ecs-rollback","owner":"abiydv","description":"AWS Lambda to rollback ECS deployment. Created with serverless framework and js","archived":false,"fork":false,"pushed_at":"2019-02-05T11:46:23.000Z","size":34,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-10-24T10:10:43.605Z","etag":null,"topics":["aws","aws-ecs","aws-ecs-cluster","aws-lambda","serverless","serverless-framework"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/abiydv.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":"2019-02-01T18:25:45.000Z","updated_at":"2021-10-15T20:54:24.000Z","dependencies_parsed_at":null,"dependency_job_id":"fe68c970-6f56-4b34-a0e0-62bed3a94b96","html_url":"https://github.com/abiydv/serverless-aws-lambda-ecs-rollback","commit_stats":null,"previous_names":["abiydv/serverless-aws-lambda-ecs-rollback"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/abiydv/serverless-aws-lambda-ecs-rollback","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abiydv%2Fserverless-aws-lambda-ecs-rollback","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abiydv%2Fserverless-aws-lambda-ecs-rollback/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abiydv%2Fserverless-aws-lambda-ecs-rollback/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abiydv%2Fserverless-aws-lambda-ecs-rollback/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/abiydv","download_url":"https://codeload.github.com/abiydv/serverless-aws-lambda-ecs-rollback/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abiydv%2Fserverless-aws-lambda-ecs-rollback/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31966978,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T00:39:45.007Z","status":"online","status_checked_at":"2026-04-18T02:00:07.018Z","response_time":103,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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","aws-ecs","aws-ecs-cluster","aws-lambda","serverless","serverless-framework"],"created_at":"2024-11-12T04:42:31.062Z","updated_at":"2026-04-18T11:32:37.811Z","avatar_url":"https://github.com/abiydv.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Serverless: AWS Lambda to rollback AWS ECS deployment\n[![CodeFactor](https://www.codefactor.io/repository/github/abiydv/serverless-aws-lambda-ecs-rollback/badge)](https://www.codefactor.io/repository/github/abiydv/serverless-aws-lambda-ecs-rollback)\n\n![servrless](https://github.com/abiydv/ref-docs/blob/master/images/logos/serverless_small.png)\n![js](https://github.com/abiydv/ref-docs/blob/master/images/logos/javascript_small.png)\n![cli](https://github.com/abiydv/ref-docs/blob/master/images/logos/aws-cli_small.png)\n![aws-lambda](https://github.com/abiydv/ref-docs/blob/master/images/logos/aws-lambda_small.png)\n![aws-ecs](https://github.com/abiydv/ref-docs/blob/master/images/logos/aws-ecs-fargate_small.png)  \n\nServerless framework example to deploy AWS Lambda, which can rollback a ECS deployment to the second last 'active' task definition version. Lambda runtime used - nodejs 8.x\n\n## Prerequisites\n   **1.** Install serverless. Follow this [guide](https://serverless.com/framework/docs/providers/aws/guide/installation/)\n   \n   **2.** Setup aws cli with profiles matching environments/stages. A sample `~/.aws/credentials` file - \n   \n   ```\n   [dev]\n   aws_access_key_id = DEV_ACCESS_KEY\n   aws_secret_access_key = DEV_SECRET_KEY\n   [qa]\n   aws_access_key_id = QA_ACCESS_KEY\n   aws_secret_access_key = QA_SECRET_KEY\n   [prod]\n   aws_access_key_id = PROD_ACCESS_KEY\n   aws_secret_access_key = PROD_SECRET_KEY\n   ```\n\n## How to use\n\n  **1.** Deploy the service with `--stage dev` argument to create the **dev** stack. Use **qa** or **prod** to launch function in other environments. \u003cbr\u003e\u003cbr\u003e\n  ***NOTE**: Create `config-qa.json` and `config-prod.json` with the respective AWS Account Id info.*\n\n  ```\n  serverless deploy -v --stage dev\n  ```\n\n  **2.** Invoke the lambda function\n  ```\n  serverless invoke -f rollback -l --stage dev\n  ```\n\n  **3.** Deploy only the lambda function after any change in lambda code. (Skip if no change)\n  ```\n  serverless deploy -f rollback --stage dev\n  ```\n\n  **4.** Cleanup everything\n  ```\n  serverless remove -v --stage dev\n  ```\n\n## Contact\n\nDrop me a note or open an issue if something doesn't work out.\n\nCheers! :thumbsup:\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabiydv%2Fserverless-aws-lambda-ecs-rollback","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabiydv%2Fserverless-aws-lambda-ecs-rollback","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabiydv%2Fserverless-aws-lambda-ecs-rollback/lists"}