ecs-deploy

raw JSON →
1.15.2 verified Mon Apr 27 auth: no python

A powerful CLI tool to simplify Amazon ECS deployments, rollbacks, and scaling. Version 1.15.2, actively maintained with recent releases adding multi-account support, Slack notifications, and Docker label configuration.

pip install ecs-deploy
error ModuleNotFoundError: No module named 'ecs_deploy'
cause Trying to import the module after installation; possibly pip install failed or wrong Python environment.
fix
Run pip install ecs-deploy in the correct virtual environment and verify with pip list | grep ecs-deploy.
error botocore.exceptions.NoCredentialsError: Unable to locate credentials
cause AWS credentials not configured for the tool to access ECS.
fix
Set environment variables AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY and optionally AWS_SESSION_TOKEN, or configure ~/.aws/credentials.
error ERROR: You must specify a task definition or an image
cause Missing required `--image` or `--task-definition` argument when running `ecs deploy`.
fix
Specify either --image <image> or --task-definition <family:revision>.
gotcha The CLI tool is invoked as `ecs` not `ecs-deploy`. For example: `ecs deploy my-cluster my-service`.
fix Use `ecs` command instead of `ecs-deploy`.
breaking In version 1.14.0, the `--account` and `--assume-role` options were introduced for multi-account deployments. If using role assumption, you must provide both.
fix Ensure you specify `--account` and `--assume-role` together when assuming roles across accounts.
deprecated The `SLACK_URL` environment variable is deprecated in favor of the `--slack-url` CLI option.
fix Use `--slack-url` instead of setting `SLACK_URL` environment variable.

Basic deployment using the library's Python API. Requires AWS credentials.

# Quickstart: deploy a service to ECS
# Ensure AWS credentials are configured (e.g., via environment variables)
import os
os.environ['AWS_ACCESS_KEY_ID'] = os.environ.get('AWS_ACCESS_KEY_ID', '')
os.environ['AWS_SECRET_ACCESS_KEY'] = os.environ.get('AWS_SECRET_ACCESS_KEY', '')
from ecs_deploy import ecs_deploy
result = ecs_deploy.deploy('my-cluster', 'my-service', image='nginx:latest')
print(result)