npm.io
0.9.3 • Published 1 month agoCLI

ecsx

Licence
MIT
Version
0.9.3
Deps
10
Size
99 kB
Vulns
0
Weekly
0

ecsx

Easily create, manage and deploy ECS based applications

oclif Version Downloads/week License

Usage

$ npm install -g ecsx
$ ecsx COMMAND
running command...
$ ecsx (--version)
ecsx/0.9.3 linux-x64 node-v26.12.1
$ ecsx --help [COMMAND]
USAGE
  $ ecsx COMMAND
...

Commands

ecsx config

Print out current configuration

USAGE
  $ ecsx config -c <value> [-h] [--var <value>...] [--taskName <value>]

FLAGS
  -c, --clusterKey=<value>  (required)
  -h, --help                Show CLI help.
  --taskName=<value>
      --var=<value>...      [default: ]

DESCRIPTION
  Print out current configuration

See code: src/commands/config.ts

ecsx console [COMMAND]

Launch a temporary interactive container

USAGE
  $ ecsx console [COMMAND] -c <value> [-h]

ARGUMENTS
  [COMMAND]  [default: /bin/sh] Command to run in the console

FLAGS
  -c, --clusterKey=<value>  (required)
  -h, --help                Show CLI help.

DESCRIPTION
  Launch a temporary interactive container

See code: src/commands/console.ts

ecsx delete TASKNAME

Remove a service/task from a cluster

USAGE
  $ ecsx delete TASKNAME -c <value> [-h] [--force]

ARGUMENTS
  TASKNAME  Name of the task to delete

FLAGS
  -c, --clusterKey=<value>  (required)
  -h, --help                Show CLI help.
  --force

DESCRIPTION
  Remove a service/task from a cluster

See code: src/commands/delete.ts

ecsx deploy TASKNAME

Create a task definition then deploy it as a service

USAGE
  $ ecsx deploy TASKNAME -c <value> -t <value> [-h] [--var <value>...]

ARGUMENTS
  TASKNAME  Name of the task to deploy

FLAGS
  -c, --clusterKey=<value>  (required)
  -h, --help                Show CLI help.
  -t, --dockerTag=<value>   (required)
      --var=<value>...      [default: ]

DESCRIPTION
  Create a task definition then deploy it as a service

See code: src/commands/deploy.ts

ecsx help [COMMAND]

Display help for ecsx.

USAGE
  $ ecsx help [COMMAND...] [-n]

ARGUMENTS
  [COMMAND...]  Command to show help for.

FLAGS
  -n, --nested-commands  Include all nested commands in the output.

DESCRIPTION
  Display help for ecsx.

See code: @oclif/plugin-help

ecsx list-clusters

Show running services within a cluster

USAGE
  $ ecsx list-clusters [-h]

FLAGS
  -h, --help  Show CLI help.

DESCRIPTION
  Show running services within a cluster

See code: src/commands/list-clusters.ts

ecsx ps

Show running services within a cluster

USAGE
  $ ecsx ps [-h] [-c <value>] [--showTasks]

FLAGS
  -c, --clusterKey=<value>  Name of the cluster key from the config
  -h, --help                Show CLI help.
      --showTasks           Show recent tasks

DESCRIPTION
  Show running services within a cluster

See code: src/commands/ps.ts

ecsx redeploy TASKNAME

Redeploy a service using its currently running tag, recycling the containers

USAGE
  $ ecsx redeploy TASKNAME -c <value> [-h] [--var <value>...]

ARGUMENTS
  TASKNAME  Name of the task to redeploy

FLAGS
  -c, --clusterKey=<value>  (required)
  -h, --help                Show CLI help.
      --var=<value>...      [default: ]

DESCRIPTION
  Redeploy a service using its currently running tag, recycling the containers

See code: src/commands/redeploy.ts

ecsx run TASKNAME

Run a one off task on the cluster

USAGE
  $ ecsx run TASKNAME -c <value> -t <value> [-h] [--var <value>...]

ARGUMENTS
  TASKNAME  Name of the task to run

FLAGS
  -c, --clusterKey=<value>  (required)
  -h, --help                Show CLI help.
  -t, --dockerTag=<value>   (required)
      --var=<value>...      [default: ]

DESCRIPTION
  Run a one off task on the cluster

See code: src/commands/run.ts

ecsx scale TASKNAME COUNT

Scale services up or down to the desired count

USAGE
  $ ecsx scale TASKNAME COUNT -c <value> [-h]

ARGUMENTS
  TASKNAME  Name of the task to scale
  COUNT     Number of instances to scale to

FLAGS
  -c, --clusterKey=<value>  (required)
  -h, --help                Show CLI help.

DESCRIPTION
  Scale services up or down to the desired count

See code: src/commands/scale.ts

ecsx verify-config [CONFIGPATH]

Scale services up or down to the desired count

USAGE
  $ ecsx verify-config [CONFIGPATH] [-h]

ARGUMENTS
  [CONFIGPATH]  Path to the configuration file

FLAGS
  -h, --help  Show CLI help.

DESCRIPTION
  Scale services up or down to the desired count

See code: src/commands/verify-config.ts

AWS Systems Session Manager

In order to use the console command, you need to have AWS System Session Manager installed on your local system.

MacOS Quick Start

These commands are taken from the full documentation. You can find information on how to install on other platforms there as well.

curl "https://s3.amazonaws.com/session-manager-downloads/plugin/latest/mac/sessionmanager-bundle.zip" -o "sessionmanager-bundle.zip"
unzip sessionmanager-bundle.zip
sudo ./sessionmanager-bundle/install -i /usr/local/sessionmanagerplugin -b /usr/local/bin/session-manager-plugin

Publishing

To publish to npm:

pnpm test # to verify everything works
pnpm build # to ensure the projcet builds properly and outputs

Then, manually bump version in package.json. Once the version is updated:

pnpm oclif readme # updates the readme with new version
git commit -am "release v1.2.3"
# create a pull request with the version bump
# once merged you can tage the commit on main to release
git tag v1.2.3
git push && git push origin v1.2.3

Pushing the v* tag triggers the publish workflow, which builds, tests and then stages the release to npm via trusted publishing (OIDC) rather than publishing it directly.

The staged release is not live yet. A maintainer must review and approve it with 2FA before it becomes available:

See the npm staged publishing docs for full details.

Keywords