Skip to content

sestrella/iecs

Repository files navigation

iecs

Build Release

Demo

An interactive CLI for ECS to help with troubleshooting tasks like:

  • Run remote commands on a container.
  • Check the logs of a running container.

Compared to the AWS CLI, if no parameters are provided to the available commands, the user would be requested to choose the desired resource from a list of all tasks running on ECS.

Installation

Nix users

The templates directory contains a complete version of the code snippets presented in this section. For a better user experience, setup sestrella binary cache to download pre-built binaries.

devenv

Add the project input into the devenv.yaml file:

inputs:
  iecs:
    url: github:sestrella/iecs
    overlays:
      - default

To install the binary, add it to the packages section in the devenv.nix file:

packages = [ pkgs.iecs ];

flake

Add the project input into the flake.nix file:

inputs.iecs.url = "github:sestrella/iecs/nix_templates";

Using it as an overlay

Add the project overlay to nixpkgs:

pkgs = import nixpkgs {
  inherit system;
  overlays = [ iecs.overlays.default ];
};

Use the binary as derivation input for creating packages or shells:

buildInputs = [ pkgs.iecs ];

Using it as a package

Use the binary as derivation input for creating packages or shells:

buildInputs = [ iecs.packages.${system}.default ];
Non-Nix users

Clone the repository:

git clone https://github.com/sestrella/iecs.git

Download and install the appropriate Go version. Check the version constraint on the go.mod to determine which version to use.

Compile and generate the binary:

go build

Copy the binary to a directory in the PATH, like ~/.local/bin:

cp iecs ~/.local/bin/iecs

[!NOTE] Check that the path where the binary is copied exists in the PATH environment variable.

Global Flags

The following global flags are available for all commands:

  • --cluster <cluster_pattern>: Filters the cluster list using the specified regex pattern.
  • --service <service_pattern>: Filters the service list using the specified regex pattern.

Commands

exec

The exec command allows running a remote command on a container. By default, it starts an interactive /bin/bash session.

  • --task <task_pattern>: Filters the task list using the specified regex pattern.
  • --container <container_pattern>: Filters the container list using the specified regex pattern.
  • -c, --command <command>: Command to run in the container (default: /bin/bash).
  • -i, --interactive: Toggles interactive mode (default: true).

References

About

An interactive CLI for ECS

Topics

Resources

License

Stars

Watchers

Forks

Contributors 2

  •  
  •