🔧 AI Nachrichten The Next Terrorist Attack Is Predictable(10.09.2026 um 23:41 Uhr)
🔧 AI Nachrichten Could A.I. Really Kill All Humans?(10.09.2026 um 23:53 Uhr)
🔧 AI Nachrichten Amazon Prime Video Uses A.I. for Lip-Synced Translations(11.09.2026 um 01:56 Uhr)
🔧 AI Nachrichten McClatchy Makes Deep Job Cuts to Newspapers Around the Country(11.09.2026 um 04:25 Uhr)
🔧 AI Nachrichten Law schools tell students to put AI away(07.09.2026 um 16:37 Uhr)
🔧 AI Nachrichten Can Huawei build China’s answer to ASML?(08.09.2026 um 04:57 Uhr)
🔧 AI Nachrichten AI is ushering in an era of mass toe-treading at work(08.09.2026 um 06:00 Uhr)
🔧 AI Nachrichten The Next Terrorist Attack Is Predictable(10.09.2026 um 23:41 Uhr)
🔧 AI Nachrichten Could A.I. Really Kill All Humans?(10.09.2026 um 23:53 Uhr)
🔧 AI Nachrichten Amazon Prime Video Uses A.I. for Lip-Synced Translations(11.09.2026 um 01:56 Uhr)
🔧 AI Nachrichten McClatchy Makes Deep Job Cuts to Newspapers Around the Country(11.09.2026 um 04:25 Uhr)
🔧 AI Nachrichten Law schools tell students to put AI away(07.09.2026 um 16:37 Uhr)
🔧 AI Nachrichten Can Huawei build China’s answer to ASML?(08.09.2026 um 04:57 Uhr)
🔧 AI Nachrichten AI is ushering in an era of mass toe-treading at work(08.09.2026 um 06:00 Uhr)

🔧 Programmierung 🕛 vor 1 Jahr 4 Min Lesezeit
0

ecstop: My CLI Tool to Stop ECS Resources Easily

↗ Quelle (dev.to)
🗣️ Stimme:
📑 Inhaltsübersicht




Introduction



On December 20, 2024, I developed and released a CLI tool called ecstop that "quickly stops ECS resources in bulk".



.



Since ECS charges for running tasks and container instances, I wanted to stop unused ones.



As it's for testing, I didn't want to delete clusters or services. They're free.



However, as I created many resources, it was troublesome to stop them one by one from the AWS console.




  • To stop a service from the console, you need to go to the ECS console, select the service and "update", set the number of tasks to 0 and "confirm update" for each service.


  • IaC and deployment tools are designed for production use and require careful configuration file changes, which isn't suitable for "quickly stopping multiple resources".




I had been using shell scripts/Go to stop them in bulk, but I often forgot how to call them.

Therefore, I decided to make a proper CLI tool.





Installation



You can install ecstop with the following command (Homebrew):




CODE
$ brew install t-kikuc/tap/ecstop






To enable auto-completion, please refer to .






1. Zero-scale Services






CODE
$ ecstop services --cluster xxx






This sets the desiredCount of all services in the xxx cluster to 0. This also automatically stops tasks linked to the services.






2. Stop Tasks






CODE
$ ecstop tasks --cluster xxx --standalone






The --standalone flag stops tasks that are not linked to services.



This applies to tasks whose group prefix is not service:.



To stop tasks linked to services, use ecstop services instead because services can start new tasks even after stopping by ecstop tasks.






3. Stop Container Instances (EC2)






CODE
$ ecstop instances --cluster xxx






This stops (≠ Terminate) all container instances linked to the xxx cluster.






4. Execute the Above Three in One Command






CODE
$ ecstop all --cluster xxx






This command is equivalent to:




CODE
$ ecstop services --cluster xxx
$ ecstop tasks --cluster xxx --standalone
$ ecstop instances --cluster xxx









Other Useful Flags





  • --all-cluster: Instead of --cluster xxx, this performs stop operations on all ECS clusters in the region.


  • --profile yyy: You can specify the AWS profile.


  • --region zzz: You can specify the AWS region.






Philosophy






1. No Deletion



ecstop does not delete unnecessary ECR images or task definitions.



While tasks and container instances (EC2) have high operating costs, ECR images are relatively inexpensive, and task definitions are free, so I ignored them. Services and clusters themselves are also free, so they are not deleted.



For this reason, I didn't include "clean" or "delete" in the tool name.



In cases where "I want to delete it because it's not being used and is an eyesore", it's easier to select multiple items from the AWS console and delete them after human judgment.



Also, for cleaning up ECR images, it's good to use a tool called ecrm created by fujiwara-san.










  • Conclusion



    This was my first time publishing a CLI tool, and I learned a lot, including how to define the philosophy.



    If you have any feedback or requests, please let me know at https://github.com/t-kikuc/ecstop.



    Actually, I'm developing another CLI tool related to ECS external deployment, which I plan to release soon.

    Vollständiger Original-Bericht
    Ausführliche Details, Code-Beispiele & Hersteller-Stellungnahme auf dev.to.
    ↗ Original-Artikel auf dev.to lesen
    Wie bewertest du diesen Beitrag?
    1 Klick Feedback
    Teilen mit Netzwerk & Team:

    Community-Analysen & Experten-Meinungen 0

    Verfasse deine eigene Analyse, teile Workarounds oder diskutiere diesen Vorfall im Blog.
    Noch keine Community-Analyse verfasst. Markiere einen Textabschnitt oder klicke oben auf Eigene Analyse verfassen“!
    Community Pulse: Relevanz-Einschätzung
    1 Klick Experten-Votum
    🔴 Akute Relevanz 0%
    🟡 In Evaluierung 0%
    🟢 Keine Auswirkung 0%
    Spannende Innovation 0%
    Verwandte Story-Cluster & Quellen (Vektor-KI)
    Port 8095 Engine
    2 Quellen
    Could A.I. Really Kill All Humans?
    1 Quelle
    The Next Terrorist Attack Is Predictable
    1 Quelle
    Anthropic Says It Blocked Possible Efforts to Build Biological Weapons
    Ähnliche Beiträge
    🔍 Verwandte News

    Auch interessante Nachrichten ecstop: My CLI Tool to Stop ECS Resources Easily

    Thematisch verwandte Begriffe: ecstop, Tool, Stop, Resources · 6 Treffer

    Laden...

    Videos werden geladen ...

    Laden...

    Beiträge werden geladen ...

    Laden...

    Videos werden geladen ...

    Laden...

    Beiträge werden geladen ...

    Laden...

    Videos werden geladen ...

    Laden...

    Beiträge werden geladen ...

    Laden...

    Videos werden geladen ...

    Laden...

    Beiträge werden geladen ...

    Laden...

    Videos werden geladen ...