Skip to main content

ecs-deplojo

PyPI Python Tests

Deployment tool for Amazon ECS.

Installation

pip install ecs-deplojo

Usage

Usage: ecs-deplojo [OPTIONS]

Options:
  --config FILENAME   [required]
  --var VAR
  --dry-run
  --output-path PATH
  --role-arn <optional arn>
  --help              Show this message and exit.

Example configuration

---
cluster_name: example

environment:
    DATABASE_URL: postgresql://

task_definitions:
  web:
    template: task_definitions/web.json
    overrides:
      uwsgi:
        memory: 512
        portMappings:
          - hostPort: 0
            containerPort: 8080
            protocol: tcp
  manage:
    template: task_definitions/manage.json

services:
  web:
    task_definition: web

scheduled_tasks:
  cron-event:
    task_definition: web

before_deploy:
  - task_definition: manage
    container: uwsgi
    command: manage.py migrate --noinput

after_deploy:
  - task_definition: manage
    container: uwsgi
    command: manage.py clearsessions

Using SSM secrets

Warning secrets will become visible in the container's environent, use with caution

When you want to use the AWS SSM secrets in your configuration you can use the secrets section, however this needs some additional configuration within AWS

At first you need an AWS IAM role to use as the ECS execution role, this role needs access to the secrets in Secrets Manager or Parameter store and will only be used during the startup of your Docker container.

Example configuration:

--
cluster_name: example

environment:
  NORMAL_ENV_VAR: value_of_variable

secrets:
  DATABASE_URL: /path/to/secret/DATABASE_URL

task_definitions:
  web:
    execution_role_arn: arn:aws:iam::<account_id>:role/execution_role_name
    template: task_definitions/web.json

services:
  web:
    task_definition: web

When the container is started the secrets are available as environment variables and hidden in the AWS ECS console, this is not recommended in production.

AWS Default VPC

When running your servers in the AWS default VPC you need networkMode="awsvpc" in your task definition JSON file, this will ensure that no hostnames are set for the containers, since this isn't supported by AWS.

AWS Fargate

Unlike EC2 based clusters AWS Fargate needs a execution_role_arn to work, this can be set in your service definition in the YAML file.

AWS Scheduled tasks

The configuration block 'scheduled_tasks' contains the name over the rule in EventBridge as key, and a reference to the task_definition whose taskDefinitionArn will be used to update the task definition on the scheduled target.

Example log output

Starting deploy on cluster example (1 services)
Registered new task definition web:10
Starting one-off task 'manage.py migrate --noinput' via manage:10 (uwsgi)
Updating service web with task defintion web:10
Waiting for deployments
Waiting for services: web (0/2)
Waiting for services: web (1/2)
Waiting for services: web (2/2)
Deployment finished: web (2/2)
Starting one-off task 'manage.py clearsessions' via manage:10 (uwsgi)

Releasing

Releases are managed with changie:

  1. Add a changelog entry to your pull request with changie new.
  2. After merging to main, a release pull request is opened (or updated) automatically, with the new version and the updated CHANGELOG.md.
  3. Merging the release pull request creates the GitHub release, which publishes the package to PyPI.

Metadata

Release files for ecs-deplojo 0.13.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ecs-deplojo 0.13.0
File Size Uploaded Provenance Actions
ecs_deplojo-0.13.0.tar.gz 93.6 kB With provenance Details for ecs_deplojo-0.13.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ecs-deplojo 0.13.0
File Interpreter ABI Platform Actions
ecs_deplojo-0.13.0-py3-none-any.whl Python 3 none any Details for ecs_deplojo-0.13.0-py3-none-any.whl

Total release size: 106.3 kB

Release files / ecs_deplojo-0.13.0.tar.gz

Download URL ecs_deplojo-0.13.0.tar.gz
Size 93.6 kB
Tags Source
SHA-256 checksum
How to use checksums
b921d451a58ca2b237c4c382eb79de63c3f21a40f618416972e71bf5f6de20c3
BLAKE2b-256 checksum
How to use checksums
14756c526a412b504eb87df0b49e3fcf7f0d0fa4c99024d60882d812cae99c11
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 27, 2026.

Transparency log

Release files / ecs_deplojo-0.13.0-py3-none-any.whl

Download URL ecs_deplojo-0.13.0-py3-none-any.whl
Size 12.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9bb8d34e7111f5faa3084af7b91b853a14f9ed10e299f2d063e430dfbc18eb1c
BLAKE2b-256 checksum
How to use checksums
1dd6770b2210b40aefef2048c434add50305b988ce07d4ba2cedceb3013d0149
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 27, 2026.

Transparency log

Security for ecs-deplojo 0.13.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for ecs_deplojo-0.13.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 27, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page