{"id":37140759,"url":"https://github.com/flou/ecs","last_synced_at":"2026-01-14T16:29:58.692Z","repository":{"id":57539767,"uuid":"122374924","full_name":"flou/ecs","owner":"flou","description":"Command line tools to interact with your ECS clusters","archived":false,"fork":false,"pushed_at":"2020-09-09T09:03:34.000Z","size":2844,"stargazers_count":7,"open_issues_count":1,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-06-20T15:58:43.759Z","etag":null,"topics":["aws","cli","ecs","ecs-cluster","golang"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"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/flou.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}},"created_at":"2018-02-21T18:19:57.000Z","updated_at":"2021-06-19T12:50:02.000Z","dependencies_parsed_at":"2022-09-26T18:31:51.600Z","dependency_job_id":null,"html_url":"https://github.com/flou/ecs","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/flou/ecs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flou%2Fecs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flou%2Fecs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flou%2Fecs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flou%2Fecs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/flou","download_url":"https://codeload.github.com/flou/ecs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flou%2Fecs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28425942,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T15:24:48.085Z","status":"ssl_error","status_checked_at":"2026-01-14T15:23:41.940Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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","cli","ecs","ecs-cluster","golang"],"created_at":"2026-01-14T16:29:57.869Z","updated_at":"2026-01-14T16:29:58.687Z","avatar_url":"https://github.com/flou.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ECS tools\n\n[![Travis](https://github.com/flou/ecs/workflows/build/badge.svg)](https://github.com/flou/ecs/actions?query=workflow%3Abuild)\n[![Go Report Card](https://goreportcard.com/badge/github.com/flou/ecs)](https://goreportcard.com/report/github.com/flou/ecs)\n\n## Installation\n\nOn MacOS:\n\n```\n$ curl -LO https://github.com/flou/ecs/releases/download/$(curl -s https://api.github.com/repos/flou/ecs/releases/latest | grep tag_name | cut -d '\"' -f 4)/ecs_darwin_amd64\n$ chmod +x ecs_darwin_amd64\n$ sudo mv ecs_darwin_amd64 /usr/local/bin/ecs\n```\n\nOn Linux:\n\n```\n$ curl -LO https://github.com/flou/ecs/releases/download/$(curl -s https://api.github.com/repos/flou/ecs/releases/latest | grep tag_name | cut -d '\"' -f 4)/ecs_linux_amd64\n$ chmod +x ecs_linux_amd64\n$ sudo mv ecs_linux_amd64 /usr/local/bin/ecs\n```\n\nOr, if you have a working Go environment:\n\n```\n$ go get -u github.com/flou/ecs\n```\n\n### Usage\n\n```\nCommand line tools to interact with your ECS clusters\n\nUsage:\n  ecs [command]\n\nAvailable Commands:\n  events      List events running in your ECS clusters\n  help        Help about any command\n  image       Print the Docker image of a service running in ECS\n  instances   List container instances in your ECS clusters\n  services    List services in your ECS clusters\n  tasks       List tasks running in your ECS clusters\n  update      Update the service to a specific DesiredCount\n\nFlags:\n  -h, --help            help for ecs\n      --region string   AWS region\n      --version         version for ecs\n\nUse \"ecs [command] --help\" for more information about a command.\n```\n\n## List running ECS services\n\nECS services lists unhealthy services in your ECS clusters\n\nThe script will list the clusters and fetch details about services that are\nrunning in it.\n\nThen it determines if the service is healthy or not:\n\n* `[OK]` means that its desiredCount equals its runningCount and it has reached a\n  steady state\n* `[WARN]` means that its desiredCount and its runningCount equal 0 but it still\n  has reached a steady state\n* `[KO]` means that its desiredCount does not equal its runningCount, or that it\n  has not reached a steady state\n\n### Usage\n\n```\nList services in your ECS clusters\n\nUsage:\n  ecs services [flags]\n\nFlags:\n  -a, --all              Print all services, ignoring their status\n  -c, --cluster string   Filter by the name of the ECS cluster\n  -h, --help             help for services\n  -l, --long             Enable detailed output of containers parameters\n  -s, --service string   Filter by the name of the ECS service\n\nGlobal Flags:\n      --region string   AWS region\n```\n\nList unhealthy services in all ECS clusters:\n\n```\n$ ecs services\n--- CLUSTER: ecs-mycluster-dev (listing 4/9 services)\n[KO]   tools-hound-dev-1                                    ACTIVE   running 0/1  (hound-dev:75)\n[WARN] tools-jenkins-dev-1                                  ACTIVE   running 0/0  (jenkins-dev:247)\n[WARN] tools-kibana-dev-1                                   ACTIVE   running 0/0  (srv-kibana:55)\n[KO]   tools-sonar-dev-1                                    ACTIVE   running 2/1  (srv-sonar:923)\n\n--- CLUSTER: ecs-mycluster-prod (listing 1/12 services)\n[WARN] tools-jenkins-prod-1                                 ACTIVE   running 0/0  (jenkins-prod:142)\n```\n\n\nBy default `ecs services` only shows services that are `KO` or `WARN`, use the `-a/--all` option to list all services. Also if all services in a cluster are `OK`, all services are shown.\n\nList unhealthy services in a specific ECS cluster:\n\n```\n$ ecs services --cluster ecs-mycluster-prod\n--- CLUSTER: ecs-mycluster-prod (listing 1/12 services)\n[WARN] tools-jenkins-prod-1                                 ACTIVE   running 0/0  (jenkins-prod:247)\n```\n\nYou can also get more information by using the -l/--long option:\n\n```\n$ ecs services --long --cluster prod\n--- CLUSTER: ecs-mycluster-prod (listing 1/12 services)\n[WARN] tools-jenkins-prod-1                                 ACTIVE   running 0/0  (jenkins-prod:142)\n- Container: jenkins\n  Image: 123456789012.dkr.ecr.us-east-1.amazonaws.com/acme/jenkins:2.77-custom\n  Memory: 1024 / CPU: 512\n  Ports: -\u003e8080\n  Environment:\n   - JAVA_OPTS: -Dhudson.footerURL=http://mycompany.com\n   - JENKINS_OPTS: --prefix=/jenkins\n   - JENKINS_SLAVE_AGENT_PORT: 50001\n   - PLATFORM: prod\n   - PROJECT: acme\n```\n\nYou can also choose to filter the services listed by their name:\n\n```\n$ ecs services -s jenkins\n--- CLUSTER: ecs-mycluster-dev (listing 1/9 services)\n[WARN] tools-jenkins-dev-1                                  ACTIVE   running 0/0  (jenkins-dev:247)\n\n--- CLUSTER: ecs-mycluster-prod (listing 1/12 services)\n[WARN] tools-jenkins-prod-1                                 ACTIVE   running 0/0  (jenkins-prod:142)\n```\n\nAlso, you can combine the flags `-s` and `-c` to filter down a specific service\nand check its health across a restricted set of clusters.\n\n## List container instances in ECS clusters\n\n```\nList container instances in your ECS clusters\n\nUsage:\n  ecs instances [flags]\n\nFlags:\n  -c, --cluster string   Filter by the name of the ECS cluster\n  -h, --help             help for instances\n  -l, --long             Enable detailed output of containers instances\n\nGlobal Flags:\n      --region string   AWS region\n```\n\nExample:\n\n```\n$ ecs instances -c ecs-mycluster\n--- CLUSTER: ecs-mycluster-dev (2 registered instances)\nINSTANCE ID           STATUS   TASKS  CPU/used CPU/free  MEM/used MEM/free       PRIVATE IP    INST.TYPE  AGENT  IMAGE         NAME\ni-0a2cc6d9443941234   ACTIVE       3       768     1280      1152     2800       10.0.98.85    t2.medium  true   ami-0693ed7f  asg-ecs-mycluster-dev\ni-020ff52ddb0538d4a   ACTIVE       3       384     1664       768     3184     10.0.125.146    t2.medium  true   ami-0693ed7f  asg-ecs-mycluster-dev\n\n--- CLUSTER: ecs-mycluster-prod (3 registered instances)\nINSTANCE ID           STATUS   TASKS  CPU/used CPU/free  MEM/used MEM/free       PRIVATE IP    INST.TYPE  AGENT  IMAGE         NAME\ni-01fad74c0f1b57b85   ACTIVE      11       704     3392      7072     8976      10.0.105.39    m4.xlarge  true   ami-0693ed7f  asg-ecs-mycluster-prod\ni-0c75cf9cee1cb5d9e   ACTIVE       6       384     3712      4352    11696      10.0.118.76    m4.xlarge  true   ami-0693ed7f  asg-ecs-mycluster-prod\ni-0c61781827ef44a52   ACTIVE       2       128     3968      1536    14512     10.0.104.249    m4.xlarge  true   ami-0693ed7f  asg-ecs-mycluster-prod\n```\n\n## Update an ECS service\n\n```\nUpdate the service to a specific DesiredCount\n\nUsage:\n  ecs update [flags]\n\nFlags:\n  -c, --cluster string   Name of the ECS cluster\n      --count int        New DesiredCount (default -1)\n  -f, --force            Force a new deployment of the service\n  -h, --help             help for update\n  -s, --service string   Name of the ECS service\n\nGlobal Flags:\n      --region string   AWS region\n```\n\nExample:\n\n```\necs update --cluster ecs-mycluster-prod --service tools-jenkins-prod-1 --count 0\n```\n\n## List tasks running on ECS\n\n```\nList tasks running in your ECS clusters\n\nUsage:\n  ecs tasks [flags]\n\nFlags:\n  -c, --cluster string   Filter by the name of the ECS cluster\n  -h, --help             help for tasks\n  -l, --long             Enable detailed output of containers parameters\n  -s, --service string   Filter by the name of the ECS service\n\nGlobal Flags:\n      --region string   AWS region\n```\n\n\n## Find the images in an ECS service\n\n```\nPrint the Docker image of a service running in ECS\n\nUsage:\n  ecs image [flags]\n\nFlags:\n      --cluster string   Name of the ECS cluster\n  -h, --help             help for image\n      --service string   Name of the ECS service\n\nGlobal Flags:\n      --region string   AWS region\n```\n\n## Display event log for services\n\n```\nList events for services running in your ECS clusters\n\nUsage:\n  ecs events [flags]\n\nFlags:\n  -c, --cluster string   Filter by the name of the ECS cluster\n  -h, --help             help for events\n  -s, --service string   Filter by the name of the ECS service\n\nGlobal Flags:\n      --region string   AWS region\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflou%2Fecs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflou%2Fecs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflou%2Fecs/lists"}