RunECS is a tool for executing one-off processes in an ECS cluster.
- Only FARGATE launch type is supported.
- Sidecar containers are not supported
Download the binary file for your platform, see releases.
brew tap meap/runecs
brew install runecs
RunECS executes the command using the specified service. The service must be specified in cluster/service
format. Further, you must specify the environment variables that determine access to AWS.
export AWS_ACCESS_KEY_ID=xxxxxx
export AWS_SECRET_ACCESS_KEY=xxxxxxx
export AWS_REGION=eu-east1
runecs rake orders:upload[14021] --service my-cluster/my-service -w
Executes the process using the last available task definition. You can pick a specific docker tag by using the --image-tag
argument. In this case, it changes the task definition and inserts the specified docker tag.
The task is run asynchronously by default. Using the --wait
argument, the task starts synchronously and returns the EXIT code of the container.
Executing a one-off process asynchronously:
runecs run rake db:migrate \
--service my-cluster/my-service \
--image-tag latest
Executing a one-off process synchronously:
runecs run rake db:migrate \
--service my-cluster/my-service \
--image-tag latest \
--wait
Deregisters old task definitions.
Use --keep-last
and --keep-days
to ensure that a certain number of definitions are always available.
runecs prune \
--service my-cluster/my-service \
--keep-last 10 --keep-days 5
Creates a new task definition with the specified image tag and updates the service to use the created task definition for new tasks.
runecs deploy \
--service my-cluster/my-service \
--image-tag latest
Prints a list of revisions of the task definition. Sorted from newest to oldest. Displays the Docker image URI used in the revision.
runecs revisions \
--service my-cluster/my-service \
--last 10